From 388d0f3fc6e75983cd0c6596436ba5fbef3a63ba Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Fri, 10 Jul 2009 10:34:02 -0400 Subject: [PATCH] catch exceptions when apps don't have conf.php files --- framework/Core/lib/Horde/Registry.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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); } -- 2.11.0