From 6c64a25d3f6f61a683fb050914f682d5875c4f98 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Tue, 17 Apr 2007 11:12:05 +0000 Subject: [PATCH] * Fix bug in conjunction with PHP 5.2.1 changed variable-by-reference handling that could result in no groups being listed for author accounts (garvinhicking) --- docs/NEWS | 4 ++++ include/functions_config.inc.php | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index badb1755..46a8c105 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,10 @@ Version 1.2 () ------------------------------------------------------------------------ + * Fix bug in conjunction with PHP 5.2.1 changed variable-by-reference + handling that could result in no groups being listed for author + accounts (garvinhicking) + * Fix redundant space when inserting links through the non-WYSIWYG editor panel. Fix "null" insertion. Thanks to Alp Uckan. diff --git a/include/functions_config.inc.php b/include/functions_config.inc.php index 575c3e56..29338726 100644 --- a/include/functions_config.inc.php +++ b/include/functions_config.inc.php @@ -1238,14 +1238,15 @@ function &serendipity_getGroups($authorid, $sequence = false) { } if ($sequence) { - $_groups = $groups; - $groups = array(); - foreach($_groups AS $grouprow) { - $groups[] = $grouprow['confkey']; + $rgroups = array(); + foreach($groups AS $grouprow) { + $rgroups[] = $grouprow['confkey']; } + } else { + $rgroups =& $groups; } - return $groups; + return $rgroups; } /**