From b43300fbcf92008ac1adc87c4b03776a9a4fb4e8 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 21 Jun 2022 18:18:32 -0500 Subject: Use Rector to upgrade constructors. Modern PHP versions do not recognize methods with the same name as the class as being constructors. This commit upgrades the code so that constructors are named `__construct`. The upgrade was done automatically using Rector. --- src/SemanticScuttle/db/mysqli.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/SemanticScuttle/db/mysqli.php') diff --git a/src/SemanticScuttle/db/mysqli.php b/src/SemanticScuttle/db/mysqli.php index 9a2709a..fcff848 100644 --- a/src/SemanticScuttle/db/mysqli.php +++ b/src/SemanticScuttle/db/mysqli.php @@ -129,7 +129,7 @@ class sql_db } $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; - + if (!$this->query_result) { $this->num_queries++; @@ -286,7 +286,7 @@ class sql_db unset($this->rowset[$cur_index]); unset($this->row[$cur_index]); - + $result = array(); while ($this->rowset[$cur_index] = $this->sql_fetchrow($query_id)) { @@ -316,7 +316,7 @@ class sql_db else { $cur_index = (is_object($query_id)) ? $query_id->cur_index : $query_id; - + if (empty($this->row[$cur_index]) && empty($this->rowset[$cur_index])) { if ($this->row[$cur_index] = $this->sql_fetchrow($query_id)) @@ -382,7 +382,7 @@ class sql_db function sql_escape($msg) { return mysqli_real_escape_string($this->db_connect_id, $msg); } - + function sql_error($sql = '') { if (!$this->return_on_error) @@ -396,7 +396,7 @@ class sql_db { $this->sql_transaction('rollback'); } - + trigger_error($message, E_USER_ERROR); } @@ -473,7 +473,7 @@ class sql_db { $html_table = TRUE; $html_hold .= ''; - + foreach (array_keys($row) as $val) { $html_hold .= ''; @@ -559,4 +559,4 @@ class sql_db } // if ... define -?> \ No newline at end of file +?> -- cgit v1.2.3
' . (($val) ? ucwords(str_replace('_', ' ', $val)) : ' ') . '