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 (
|
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_") {
|
||||||
|
|
Loading…
Reference in a new issue