If we don't load PEAR Log, the log constant is undefined and thus interpreted
authorJan Schneider <jan@horde.org>
Mon, 3 May 2010 08:55:10 +0000 (10:55 +0200)
committerJan Schneider <jan@horde.org>
Mon, 3 May 2010 08:55:34 +0000 (10:55 +0200)
as a string in PHP.

framework/Core/lib/Horde/Core/Binder/Logger.php

index 6ae5060..10ce017 100644 (file)
@@ -62,7 +62,7 @@ class Horde_Core_Binder_Logger implements Horde_Injector_Binder
             break;
         }
 
-        if (!is_string($conf['log']['priority'])) {
+        if (!defined('Horde_Log::' . $conf['log']['priority'])) {
             $conf['log']['priority'] = 'NOTICE';
         }
         $handler->addFilter(constant('Horde_Log::' . $conf['log']['priority']));