Do not output trace for trivial errors even in debug mode

This commit is contained in:
Vladimir Razuvaev 2017-07-25 20:08:34 +07:00
parent 3e6f2c9e83
commit e7838d2253

View File

@ -91,9 +91,13 @@ class FormattedError
}
if ($debug & self::INCLUDE_TRACE > 0) {
$isTrivial = $e instanceof Error && !$e->getPrevious();
if (!$isTrivial) {
$debugging = $e->getPrevious() ?: $e;
$result['trace'] = static::toSafeTrace($debugging->getTrace());
}
}
return $result;
}