catch exceptions when apps don't have conf.php files
authorChuck Hagenbuch <chuck@horde.org>
Fri, 10 Jul 2009 14:34:02 +0000 (10:34 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Fri, 10 Jul 2009 14:34:02 +0000 (10:34 -0400)
framework/Core/lib/Horde/Registry.php

index c693f9b..253fec9 100644 (file)
@@ -898,9 +898,14 @@ class Horde_Registry
      */
     public function importConfig($app)
     {
-        if (($app != 'horde') &&
-            !$this->_loadCacheVar('conf-' . $app)) {
-            $this->_cache['conf-' . $app] = Horde_Array::array_merge_recursive_overwrite($this->_cache['conf-horde'], Horde::loadConfiguration('conf.php', 'conf', $app));
+        if (($app != 'horde') && !$this->_loadCacheVar('conf-' . $app)) {
+            try {
+                $appConfig = Horde::loadConfiguration('conf.php', 'conf', $app);
+            } catch (Horde_Exception $e) {
+                $appConfig = array();
+            }
+
+            $this->_cache['conf-' . $app] = Horde_Array::array_merge_recursive_overwrite($this->_cache['conf-horde'], $appConfig);
             $this->_saveCacheVar('conf-' . $app);
         }