We should check values after we fetched them :-)
This commit is contained in:
parent
6601e8c2b7
commit
bebcbd04d3
1 changed files with 8 additions and 3 deletions
|
@ -707,9 +707,6 @@ function logger($msg, $level = 0) {
|
|||
if (
|
||||
$a->module == 'install'
|
||||
|| ! ($db && $db->connected)
|
||||
|| ! $debugging
|
||||
|| ! $logfile
|
||||
|| $level > $loglevel
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
@ -718,6 +715,14 @@ function logger($msg, $level = 0) {
|
|||
$logfile = get_config('system','logfile');
|
||||
$loglevel = intval(get_config('system','loglevel'));
|
||||
|
||||
if (
|
||||
! $debugging
|
||||
|| ! $logfile
|
||||
|| $level > $loglevel
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (count($LOGGER_LEVELS) == 0) {
|
||||
foreach (get_defined_constants() as $k => $v) {
|
||||
if (substr($k, 0, 7) == "LOGGER_") {
|
||||
|
|
Loading…
Reference in a new issue