]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Profile_prefs::getAll fix prefs loop
authorChimo <chimo@chromic.org>
Thu, 17 Dec 2015 14:58:06 +0000 (14:58 +0000)
committerChimo <chimo@chromic.org>
Thu, 17 Dec 2015 14:58:06 +0000 (14:58 +0000)
DataObject::fetch doesn't return an object.

classes/Profile_prefs.php

index 996fc1b6b6ebbd26c11ad73d1b73a943f5a4396c..bc7c400b890a2c8d3775b359256d0fd88c61a4e3 100644 (file)
@@ -91,11 +91,11 @@ class Profile_prefs extends Managed_DataObject
         }
 
         $list = array();
-        while ($entry = $prefs->fetch()) {
-            if (!isset($list[$entry->namespace])) {
-                $list[$entry->namespace] = array();
+        while ($prefs->fetch()) {
+            if (!isset($list[$prefs->namespace])) {
+                $list[$prefs->namespace] = array();
             }
-            $list[$entry->namespace][$entry->topic] = $entry->data;
+            $list[$prefs->namespace][$prefs->topic] = $prefs->data;
         }
         return $list;
     }