Skip to content

Commit

Permalink
Fix monolog handler not accepting Throwable
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive committed Apr 29, 2018
1 parent 61c862b commit b5b7dc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Raven/Breadcrumbs/MonologHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ protected function write(array $record)
return;
}

if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Exception) {
if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) {
/**
* @var Exception $exc
* @var \Exception|\Throwable $exc
*/
$exc = $record['context']['exception'];
$crumb = array(
Expand Down

0 comments on commit b5b7dc4

Please # to comment.