Просмотр исходного кода

Fix array offset access on null in RavenHandler

Jérémy DECOOL 5 лет назад
Родитель
Сommit
ec3b35f72c
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/Monolog/Handler/RavenHandler.php

+ 1 - 1
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;
             }