From 21608260d1b8a7bab9f8bab60bdc506af25985e6 Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Fri, 8 Jan 2010 00:54:15 +0000 Subject: Fixed GetBlocks() passing a bad result to mysqli fetch. git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@455 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- includes/sql.class.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'includes/sql.class.php') diff --git a/includes/sql.class.php b/includes/sql.class.php index 30b87e4..6bda00f 100644 --- a/includes/sql.class.php +++ b/includes/sql.class.php @@ -73,20 +73,19 @@ class Bayonet_SQL } public function FetchArray($p_result) - { - global $db_fetches; - $db_fetches++; + { + global $db_fetches; + $db_fetches++; + decho('Fetching result'); - decho('Fetching result'); - - while ($row = mysqli_fetch_array($p_result, MYSQLI_ASSOC)) { - $result[] = $row; - } - - $this->Free($p_result); - - return is_array($result) ? $result : array(); + while ($row = mysqli_fetch_array($p_result, MYSQLI_ASSOC)) + { + $result[] = $row; } + $this->Free($p_result); + + return is_array($result) ? $result : array(); + } public function FetchObject($p_result, $class, $no_array = false) { -- cgit