mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Fixes #3815 - deftrue not found issue.
This commit is contained in:
parent
4b44128cdb
commit
f1081c2b21
20
class2.php
20
class2.php
@ -2371,6 +2371,22 @@ class error_handler
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deftrue function independent of core function.
|
||||
* @param $value
|
||||
* @return bool
|
||||
*/
|
||||
private function deftrue($value)
|
||||
{
|
||||
if (defined($value) && constant($value))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $type
|
||||
* @param $message
|
||||
@ -2389,7 +2405,7 @@ class error_handler
|
||||
case E_DEPRECATED:
|
||||
// case E_STRICT:
|
||||
|
||||
if ($startup_error || deftrue('E107_DBG_ALLERRORS') || deftrue('E107_DBG_ERRBACKTRACE'))
|
||||
if ($startup_error || $this->deftrue('E107_DBG_ALLERRORS') || $this->deftrue('E107_DBG_ERRBACKTRACE'))
|
||||
{
|
||||
|
||||
|
||||
@ -2411,7 +2427,7 @@ class error_handler
|
||||
}
|
||||
break;
|
||||
case E_WARNING:
|
||||
if ($startup_error || deftrue('E107_DBG_BASIC') || deftrue('E107_DBG_ERRBACKTRACE'))
|
||||
if ($startup_error || $this->deftrue('E107_DBG_BASIC') || $this->deftrue('E107_DBG_ERRBACKTRACE'))
|
||||
{
|
||||
// $error['short'] = "Warning: {$message}, Line {$line} of {$file}<br />\n";
|
||||
$error['short'] = "<span class='label label-".$this->color[$type]."'>".$this->label[$type]."</span> {$message}, Line <mark>{$line}</mark> of {$file}<br />\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user