don't output backtrace for user errors
This commit is contained in:
parent
2b69a7aad5
commit
e7b2e7ec92
@ -102,13 +102,16 @@ class ErrorHandler {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$userError = ($errorNumber == E_USER_ERROR || $errorNumber == E_USER_WARNING || $errorNumber == E_USER_NOTICE ||
|
||||||
|
$errorNumber == E_USER_DEPRECATED);
|
||||||
|
|
||||||
// Log error
|
// Log error
|
||||||
$errorTag = $this->getErrorTag($errorNumber);
|
$errorTag = $this->getErrorTag($errorNumber);
|
||||||
$message = $errorTag . ': ' . $errorString;
|
$message = $errorTag . ': ' . $errorString;
|
||||||
$traceMessage = $this->parseBackTrace(debug_backtrace());
|
$traceMessage = $this->parseBackTrace(debug_backtrace());
|
||||||
logMessage($message . PHP_EOL . $traceMessage);
|
logMessage($message . ($userError ? '' : PHP_EOL . $traceMessage));
|
||||||
|
|
||||||
if ($this->reportErrors && $errorNumber != E_USER_ERROR && $errorNumber != E_USER_WARNING && $errorNumber != E_USER_NOTICE) {
|
if ($this->reportErrors && !$userError) {
|
||||||
$error = array();
|
$error = array();
|
||||||
$error["Type"] = "Error";
|
$error["Type"] = "Error";
|
||||||
$error["Message"] = $message;
|
$error["Message"] = $message;
|
||||||
|
Loading…
Reference in New Issue
Block a user