]> git.mjollnir.org Git - s9y.git/commitdiff
* Fix bug in conjunction with PHP 5.2.1 changed variable-by-reference
authorgarvinhicking <garvinhicking>
Tue, 17 Apr 2007 11:12:05 +0000 (11:12 +0000)
committergarvinhicking <garvinhicking>
Tue, 17 Apr 2007 11:12:05 +0000 (11:12 +0000)
      handling that could result in no groups being listed for author
      accounts (garvinhicking)

docs/NEWS
include/functions_config.inc.php

index badb1755171a75b09bcd44bc55d14a7891848ec6..46a8c10539d4887bf07a7c1d2b2928af4dd6ad7b 100644 (file)
--- 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.
       
index 575c3e565b3116236cd2a8a691ac3a6c8b511fc3..2933872654a259b35995600009c88906a6501209 100644 (file)
@@ -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;
 }
 
 /**