From 5c27f8153af36e46a909c6d7d537e25c6aac40d9 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sat, 8 Mar 2014 13:13:49 +0100 Subject: [PATCH] Config code scares me... this fixes an error on Configuration / Logging --- application/forms/Config/LoggingForm.php | 25 ++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/application/forms/Config/LoggingForm.php b/application/forms/Config/LoggingForm.php index 551cab7f8..f85219cac 100644 --- a/application/forms/Config/LoggingForm.php +++ b/application/forms/Config/LoggingForm.php @@ -29,13 +29,13 @@ namespace Icinga\Form\Config; -use \Zend_Config; -use \Zend_Form_Element_Text; -use \Icinga\Application\Config as IcingaConfig; -use \Icinga\Application\Icinga; -use \Icinga\Web\Form; -use \Icinga\Web\Form\Validator\WritablePathValidator; -use \Icinga\Web\Form\Decorator\ConditionalHidden; +use Zend_Config; +use Zend_Form_Element_Text; +use Icinga\Application\Config; +use Icinga\Application\Icinga; +use Icinga\Web\Form; +use Icinga\Web\Form\Validator\WritablePathValidator; +use Icinga\Web\Form\Decorator\ConditionalHidden; /** * Form class for setting the application wide logging configuration @@ -108,12 +108,13 @@ class LoggingForm extends Form $config = $this->getConfiguration(); $logging = $config->logging; + if ($logging === null) { - $logging = new IcingaConfig(array()); + $logging = new Zend_Config(array()); } - $debug = $config->logging->debug; + $debug = $logging->debug; if ($debug === null) { - $debug = new IcingaConfig(array()); + $debug = new Zend_Config(array()); } $txtLogPath = new Zend_Form_Element_Text( @@ -191,10 +192,10 @@ class LoggingForm extends Form { $config = $this->getConfiguration(); if ($config->logging === null) { - $config->logging = new IcingaConfig(array()); + $config->logging = new Zend_Config(array()); } if ($config->logging->debug === null) { - $config->logging->debug = new IcingaConfig(array()); + $config->logging->debug = new Zend_Config(array()); } $values = $this->getValues();