Don't throw an error if there aren't any interfaces set for some reason
authorChuck Hagenbuch <chuck@horde.org>
Fri, 4 Jun 2010 19:48:16 +0000 (15:48 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Fri, 4 Jun 2010 20:14:32 +0000 (16:14 -0400)
framework/Core/lib/Horde/Registry.php

index b519f1b..33f0ee0 100644 (file)
@@ -648,9 +648,11 @@ class Horde_Registry
     public function listAPIs()
     {
         if (empty($this->_apis)) {
-            foreach (array_keys($this->_cache['interfaces']) as $interface) {
-                list($api,) = explode('/', $interface, 2);
-                $this->_apis[$api] = true;
+            if (!empty($this->_cache['interfaces'])) {
+                foreach (array_keys($this->_cache['interfaces']) as $interface) {
+                    list($api,) = explode('/', $interface, 2);
+                    $this->_apis[$api] = true;
+                }
             }
         }