Skip to content

Commit

Permalink
Adjust instantiating Backtrace / setting internal classes
Browse files Browse the repository at this point in the history
  • Loading branch information
bkdotcom committed Jun 18, 2022
1 parent c4e52d9 commit 80ca0f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/Debug/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public function register(Container $container)
$backtrace = $debug->errorHandler->backtrace;
$backtrace->addInternalClass(array(
'bdk\\Debug',
'bdk\\PubSub\\',
));
return $backtrace;
};
Expand Down
4 changes: 4 additions & 0 deletions src/ErrorHandler/AbstractErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ protected function getBacktrace()
{
if (!$this->backtrace) {
$this->backtrace = new Backtrace();
$this->backtrace->addInternalClass(array(
'bdk\\ErrorHandler',
'bdk\\PubSub\\',
));
}
return $this->backtrace;
}
Expand Down
4 changes: 0 additions & 4 deletions src/ErrorHandler/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ public function __construct(ErrorHandler $errHandler, array $values)
}
if (\in_array($this->values['type'], array(E_ERROR, E_USER_ERROR)) && $this->values['exception'] === null) {
// will return empty unless xdebug extension installed/enabled
$this->subject->backtrace->addInternalClass(array(
'bdk\\ErrorHandler',
'bdk\\PubSub',
));
$this->backtrace = $this->subject->backtrace->get();
}
}
Expand Down

0 comments on commit 80ca0f6

Please sign in to comment.