prefGroups can have no member entries - concession to allow H3 prefs.php work somewhat ok
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 12 Apr 2010 20:37:52 +0000 (14:37 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 12 Apr 2010 20:37:52 +0000 (14:37 -0600)
framework/Core/lib/Horde/Core/Prefs/Ui.php

index ba04525..45d0e49 100644 (file)
@@ -141,13 +141,15 @@ class Horde_Core_Prefs_Ui
     {
         $prefs = array();
 
-        foreach ($this->prefGroups[$group]['members'] as $pref) {
-            if (!$GLOBALS['prefs']->isLocked($pref) &&
-                !in_array($pref, $this->suppress) &&
-                (!$implicit ||
-                 (!empty($this->prefs[$pref]['type']) &&
-                  ($this->prefs[$pref]['type'] != 'implicit')))) {
-                $prefs[] = $pref;
+        if (!empty($this->prefGroups[$group]['members'])) {
+            foreach ($this->prefGroups[$group]['members'] as $pref) {
+                if (!$GLOBALS['prefs']->isLocked($pref) &&
+                    !in_array($pref, $this->suppress) &&
+                    (!$implicit ||
+                     (!empty($this->prefs[$pref]['type']) &&
+                      ($this->prefs[$pref]['type'] != 'implicit')))) {
+                    $prefs[] = $pref;
+                }
             }
         }