1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 21:26:43 +02:00

Merge pull request #1472 from jdecool/avoid-array-accesson-on-null

Fix array offset access on null in RavenHandler
This commit is contained in:
Jordi Boggiano
2020-07-08 21:00:48 +02:00
committed by GitHub

View File

@@ -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;
}