From 0f34e13a6f035c35ed58003773a3ce6d193f61ab Mon Sep 17 00:00:00 2001 From: radiskull Date: Wed, 4 Jan 2012 21:21:13 +0000 Subject: [PATCH] --- ag/include/usergroup.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ag/include/usergroup.inc.php b/ag/include/usergroup.inc.php index 601ceae..949a241 100644 --- a/ag/include/usergroup.inc.php +++ b/ag/include/usergroup.inc.php @@ -39,8 +39,10 @@ function getUserGroups($user) { } $i = 0; - while ($result = mysql_fetch_assoc($qry)) { - $groups[] = array("gruppen_id" => $result['gruppen_id'], "gruppen_name" => $result['gruppen_name']); + if($qry) { + while ($result = mysql_fetch_assoc($qry)) { + $groups[] = array("gruppen_id" => $result['gruppen_id'], "gruppen_name" => $result['gruppen_name']); + } } return $groups;