Skip to content
Snippets Groups Projects
Commit 80518917 authored by chris's avatar chris
Browse files

fix for php5's more stringent type checking in foreach (auth/mysql.class.php)

as described at http://wiki.splitbrain.org/wiki:auth:mysql#using_mysql_5

darcs-hash:20060803231253-9b6ab-bbf06ef1e9141c5ec1d3c79dad7f88481296ad8b.gz
parent f255651b
No related branches found
No related tags found
No related merge requests found
......@@ -342,9 +342,11 @@ class auth_mysql extends auth_basic {
$sql .= " ".$this->cnf['SortOrder']." LIMIT $first, $limit";
$result = $this->_queryDB($sql);
foreach ($result as $user)
if (($info = $this->_getUserInfo($user['user'])))
$out[$user['user']] = $info;
if (!empty($result)) {
foreach ($result as $user)
if (($info = $this->_getUserInfo($user['user'])))
$out[$user['user']] = $info;
}
$this->_unlockTables();
$this->_closeDB();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment