Fix undefined configuration value.
authorJan Schneider <jan@horde.org>
Mon, 22 Mar 2010 22:30:16 +0000 (23:30 +0100)
committerJan Schneider <jan@horde.org>
Mon, 22 Mar 2010 22:30:16 +0000 (23:30 +0100)
framework/Core/lib/Horde/Core/Binder/Logger.php

index 9b2ade0..630fba2 100644 (file)
@@ -16,8 +16,11 @@ class Horde_Core_Binder_Logger implements Horde_Injector_Binder
             $append = ($conf['log']['type'] == 'file')
                 ? ($conf['log']['params']['append'] ? 'a+' : 'w+')
                 : null;
+            $format = isset($conf['log']['params']['format'])
+                ? $conf['log']['params']['format']
+                : 'default';
 
-            switch ($conf['log']['params']['format']) {
+            switch ($format) {
             case 'custom':
                 $formatter = new Horde_Log_Formatter_Xml(array('format' => $conf['log']['params']['template']));
                 break;