We should check values after we fetched them :-)

This commit is contained in:
Michael 2016-10-28 04:29:22 +00:00
parent 6601e8c2b7
commit bebcbd04d3

View file

@ -707,9 +707,6 @@ function logger($msg, $level = 0) {
if ( if (
$a->module == 'install' $a->module == 'install'
|| ! ($db && $db->connected) || ! ($db && $db->connected)
|| ! $debugging
|| ! $logfile
|| $level > $loglevel
) { ) {
return; return;
} }
@ -718,6 +715,14 @@ function logger($msg, $level = 0) {
$logfile = get_config('system','logfile'); $logfile = get_config('system','logfile');
$loglevel = intval(get_config('system','loglevel')); $loglevel = intval(get_config('system','loglevel'));
if (
! $debugging
|| ! $logfile
|| $level > $loglevel
) {
return;
}
if (count($LOGGER_LEVELS) == 0) { if (count($LOGGER_LEVELS) == 0) {
foreach (get_defined_constants() as $k => $v) { foreach (get_defined_constants() as $k => $v) {
if (substr($k, 0, 7) == "LOGGER_") { if (substr($k, 0, 7) == "LOGGER_") {