From: Chuck Hagenbuch Date: Fri, 10 Jul 2009 14:34:02 +0000 (-0400) Subject: catch exceptions when apps don't have conf.php files X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=388d0f3fc6e75983cd0c6596436ba5fbef3a63ba;p=horde.git catch exceptions when apps don't have conf.php files --- diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index c693f9b42..253fec953 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -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); }