How do we want to deal with optional configuration files?
authorJan Schneider <jan@horde.org>
Tue, 14 Jul 2009 11:49:46 +0000 (13:49 +0200)
committerJan Schneider <jan@horde.org>
Tue, 14 Jul 2009 11:49:46 +0000 (13:49 +0200)
We used to ignore PEAR_Errors where config files are optional. This no longer
works with exceptions.

framework/Core/lib/Horde.php

index 58f3369..21cdb79 100644 (file)
@@ -692,7 +692,8 @@ HTML;
         // Return an error if neither main or vhosted versions of the config
         // file exist.
         if (!$was_included) {
-            throw new Horde_Exception(sprintf('Failed to import configuration file "%s".', $config_dir . $config_file));
+            Horde::logMessage(sprintf('Failed to import configuration file "%s".', $config_dir . $config_file), __FILE__, __LINE__, PEAR_LOG_DEBUG);
+            return;
         }
 
         if (isset($output) && $show_output) {