From cece9d7e65b6a7a26cd2c8b93de59e12696deb87 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 17 Apr 2018 10:21:47 +0200 Subject: [PATCH] LoggingConfigForm: Fix that the facility is missing without any log config Also re-sets syslog as the default selection as it's the actual default without any log config. The previous commit in this file fixed this the wrong way. (Shame on me..) --- application/forms/Config/General/LoggingConfigForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/forms/Config/General/LoggingConfigForm.php b/application/forms/Config/General/LoggingConfigForm.php index f8c41a4c4..3b518adae 100644 --- a/application/forms/Config/General/LoggingConfigForm.php +++ b/application/forms/Config/General/LoggingConfigForm.php @@ -39,8 +39,8 @@ class LoggingConfigForm extends Form 'label' => $this->translate('Logging Type'), 'description' => $this->translate('The type of logging to utilize.'), 'multiOptions' => array( - 'php' => $this->translate('Webserver Log', 'app.config.logging.type'), 'syslog' => 'Syslog', + 'php' => $this->translate('Webserver Log', 'app.config.logging.type'), 'file' => $this->translate('File', 'app.config.logging.type'), 'none' => $this->translate('None', 'app.config.logging.type') ) @@ -94,7 +94,7 @@ class LoggingConfigForm extends Form ) ); - if (isset($formData['logging_log']) && $formData['logging_log'] === 'syslog') { + if (! isset($formData['logging_log']) || $formData['logging_log'] === 'syslog') { if (Platform::isWindows()) { /* @see https://secure.php.net/manual/en/function.openlog.php */ $this->addElement(