summaryrefslogtreecommitdiffstats
path: root/include/db.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2013-02-25 21:29:12 -0800
committerArun Persaud <arun@nubati.net>2013-02-25 21:30:54 -0800
commit94bbb934cb0bc65c72e2ab724f4bf99b3c7207be (patch)
treef1d74da64460070d626d2471d21810e173491271 /include/db.php
parent14827e2adeee23e03a1223e237faf363b5ce0a3c (diff)
downloade-DoKo-94bbb934cb0bc65c72e2ab724f4bf99b3c7207be.tar.gz
e-DoKo-94bbb934cb0bc65c72e2ab724f4bf99b3c7207be.tar.bz2
e-DoKo-94bbb934cb0bc65c72e2ab724f4bf99b3c7207be.zip
BUGFIX: mysql needs to return NULL when nothing was found
Diffstat (limited to 'include/db.php')
-rw-r--r--include/db.php5
1 files changed, 4 insertions, 1 deletions
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()