From 94bbb934cb0bc65c72e2ab724f4bf99b3c7207be Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Mon, 25 Feb 2013 21:29:12 -0800 Subject: BUGFIX: mysql needs to return NULL when nothing was found --- include/db.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/db.php') 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() -- cgit v1.2.3-18-g5258