From adae72850152a629ba9ad0a572fe3e445f23ce13 Mon Sep 17 00:00:00 2001 From: matthiasgrimm Date: Mon, 22 May 2006 18:23:27 +0200 Subject: MySQL Bug - PHP warning if query result is empty If a database query has no result, the returned array is not valid. This caused a PHP warning in the user manager if the filter is set in a way that the result list is empty. darcs-hash:20060522162327-7ef76-d8fa89a047a9a159b600f11ccb189e845b2a5b8f.gz --- inc/auth/mysql.class.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/auth/mysql.class.php') diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php index 849d48646..71788f57d 100644 --- a/inc/auth/mysql.class.php +++ b/inc/auth/mysql.class.php @@ -756,6 +756,7 @@ class auth_mysql extends auth_basic { * @author Matthias Grimm */ function _queryDB($query) { + $resultarray = array(); if ($this->dbcon) { $result = @mysql_query($query,$this->dbcon); if ($result) { -- cgit v1.2.3