Skip to content

Commit

Permalink
Merge pull request #31 from klevu/set-custom-error-handler
Browse files Browse the repository at this point in the history
Update bootstrap setCustomErrorHandler
  • Loading branch information
PascalBrouwers authored Mar 6, 2023
2 parents 231149f + a8f0d76 commit 015bb3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion framework/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ function rdTimerStart($name, $asFloat = false): callable
function setCustomErrorHandler()
{
set_error_handler(function ($errNo, $errStr, $errFile, $errLine) {
if (error_reporting()) {
$errLevel = error_reporting();
if (($errLevel & $errNo) !== 0) {
$errorNames = [
E_ERROR => 'Error',
E_WARNING => 'Warning',
Expand Down

0 comments on commit 015bb3d

Please sign in to comment.