From 281d73b03adb4906acd9483911aa8edb04e68f6b Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 May 2013 16:32:31 -0700 Subject: issue #55 (number 2) --- include/group.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/group.php b/include/group.php index 1a3ed669f..ff17a726c 100644 --- a/include/group.php +++ b/include/group.php @@ -296,12 +296,14 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0 function expand_groups($a) { if(! (is_array($a) && count($a))) return array(); - stringify_array_elms($groups); - $groups = implode(',', $a); + $x = $a; + stringify_array_elms($x); + $groups = implode(',', $x); $groups = dbesc($groups); - $r = q("SELECT xchan FROM `group_member` WHERE `gid` IN ( $groups )"); + if($groups) + $r = q("SELECT xchan FROM group_member WHERE gid IN ( $groups )"); $ret = array(); - if(count($r)) + if($r) foreach($r as $rr) $ret[] = $rr['xchan']; return $ret; -- cgit v1.2.3