From: Arun Persaud Date: Tue, 26 Feb 2013 05:29:12 +0000 (-0800) Subject: BUGFIX: mysql needs to return NULL when nothing was found X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94bbb934cb0bc65c72e2ab724f4bf99b3c7207be;p=e-DoKo.git BUGFIX: mysql needs to return NULL when nothing was found --- diff --git a/include/db.php b/include/db.php index 91e5015..493b93d 100644 --- a/include/db.php +++ b/include/db.php @@ -114,7 +114,10 @@ function DB_query($query) function DB_fetch_array($result) { - return $result->fetch_array(MYSQLI_NUM); + if($result) + return $result->fetch_array(MYSQLI_NUM); + else + return NULL; } function DB_insert_id()