Profile_prefs::getAll fix prefs loop

DataObject::fetch doesn't return an object.
This commit is contained in:
Chimo 2015-12-17 14:58:06 +00:00
parent 71119e4980
commit 90945e548b

View 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;
}