mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
Fixes #3815 - deftrue not found issue.
This commit is contained in:
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 $type
|
||||||
* @param $message
|
* @param $message
|
||||||
@@ -2389,7 +2405,7 @@ class error_handler
|
|||||||
case E_DEPRECATED:
|
case E_DEPRECATED:
|
||||||
// case E_STRICT:
|
// 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;
|
break;
|
||||||
case E_WARNING:
|
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'] = "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";
|
$error['short'] = "<span class='label label-".$this->color[$type]."'>".$this->label[$type]."</span> {$message}, Line <mark>{$line}</mark> of {$file}<br />\n";
|
||||||
|
Reference in New Issue
Block a user