From b5b7dc4bc842487b56ac0aa79204cd4fe1b35ffb Mon Sep 17 00:00:00 2001 From: Alex Bouma Date: Sun, 29 Apr 2018 14:38:48 +0200 Subject: [PATCH] Fix monolog handler not accepting Throwable --- lib/Raven/Breadcrumbs/MonologHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Raven/Breadcrumbs/MonologHandler.php b/lib/Raven/Breadcrumbs/MonologHandler.php index 52a658dbd..8a14301bb 100644 --- a/lib/Raven/Breadcrumbs/MonologHandler.php +++ b/lib/Raven/Breadcrumbs/MonologHandler.php @@ -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(