From ec3b35f72ccbb17778488671a3a784742a103f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20DECOOL?= Date: Thu, 4 Jun 2020 23:13:45 +0200 Subject: [PATCH] Fix array offset access on null in RavenHandler --- src/Monolog/Handler/RavenHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monolog/Handler/RavenHandler.php b/src/Monolog/Handler/RavenHandler.php index 1929f25f..9d24dfe8 100644 --- a/src/Monolog/Handler/RavenHandler.php +++ b/src/Monolog/Handler/RavenHandler.php @@ -86,7 +86,7 @@ class RavenHandler extends AbstractProcessingHandler // the record with the highest severity is the "main" one $record = array_reduce($records, function ($highest, $record) { - if ($record['level'] > $highest['level']) { + if (null === $highest || $record['level'] > $highest['level']) { return $record; }