Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Commit

Permalink
Fix error handler when triggered from anonymous functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
nielssp committed Oct 30, 2016
1 parent 62830a3 commit a852de0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Log/ErrorHandler.php
Expand Up @@ -205,8 +205,12 @@ public function handle($type, $message, $file, $line)
case E_USER_WARNING:
case E_USER_ERROR:
$backtrace = debug_backtrace();
$file = $backtrace[2]['file'];
$line = $backtrace[2]['line'];
if (isset($backtrace[2]['file'])) {
$file = $backtrace[2]['file'];
}
if (isset($backtrace[2]['line'])) {
$line = $backtrace[2]['line'];
}
break;
}
switch ($type) {
Expand Down

0 comments on commit a852de0

Please sign in to comment.