Commit daf481e5 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-682 Compare the configured LOGBACKEND lowercase.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 50da8839
...@@ -224,7 +224,7 @@ class ZPush { ...@@ -224,7 +224,7 @@ class ZPush {
define('LOGBACKEND', 'filelog'); define('LOGBACKEND', 'filelog');
} }
if (LOGBACKEND == 'syslog') { if (strtolower(LOGBACKEND) == 'syslog') {
define('LOGBACKEND_CLASS', 'Syslog'); define('LOGBACKEND_CLASS', 'Syslog');
if (!defined('LOG_SYSLOG_FACILITY')) { if (!defined('LOG_SYSLOG_FACILITY')) {
define('LOG_SYSLOG_FACILITY', LOG_LOCAL0); define('LOG_SYSLOG_FACILITY', LOG_LOCAL0);
...@@ -250,7 +250,7 @@ class ZPush { ...@@ -250,7 +250,7 @@ class ZPush {
throw new FatalMisconfigurationException("LOG_SYSLOG_HOST is defined but the LOG_SYSLOG_PORT does not seem to be valid."); throw new FatalMisconfigurationException("LOG_SYSLOG_HOST is defined but the LOG_SYSLOG_PORT does not seem to be valid.");
} }
} }
elseif (LOGBACKEND == 'filelog') { elseif (strtolower(LOGBACKEND) == 'filelog') {
define('LOGBACKEND_CLASS', 'FileLog'); define('LOGBACKEND_CLASS', 'FileLog');
if (!defined('LOGFILEDIR')) if (!defined('LOGFILEDIR'))
throw new FatalMisconfigurationException("The LOGFILEDIR is not configured. Check if the config.php file is in place."); throw new FatalMisconfigurationException("The LOGFILEDIR is not configured. Check if the config.php file is in place.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment