Throw error if config file is not found.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 25 Aug 2010 16:56:06 +0000 (10:56 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 25 Aug 2010 16:56:06 +0000 (10:56 -0600)
If config file is not found at all, this should be treated the same as
errors in the config file - by throwing an Exception (the existing
comment agrees with this).  The calling code should be responsible for
determining whether the absence of the file should be fatal or not (If
fatal, the missing file error message will be logged there).

framework/Core/lib/Horde.php

index e29fdef..68a7c95 100644 (file)
@@ -768,8 +768,7 @@ HTML;
         // Return an error if neither main or vhosted versions of the config
         // file exist.
         if (!$was_included) {
-            self::logMessage(sprintf('Failed to import configuration file "%s".', $config_dir . $config_file), 'DEBUG');
-            return is_array($var_names) ? array() : null;
+            throw new Horde_Exception(sprintf('Failed to import configuration file "%s".', $config_dir . $config_file));
         }
 
         if (isset($output) && $show_output) {