From: Michael M Slusarz Date: Wed, 25 Aug 2010 16:56:06 +0000 (-0600) Subject: Throw error if config file is not found. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8455f906c8cdfb293fcf0083f754d4d4fde79c4a;p=horde.git 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). --- 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) {