From 8455f906c8cdfb293fcf0083f754d4d4fde79c4a Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 25 Aug 2010 10:56:06 -0600 Subject: [PATCH] Throw error if config file is not found. 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index e29fdef5d..68a7c95c0 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -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) { -- 2.11.0