1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-07 13:46:38 +02:00

Avoid calling nested handler entirely if there is nothing left to handle

This commit is contained in:
Jordi Boggiano
2019-11-15 15:46:53 +01:00
committed by GitHub
parent 525d29847a
commit 3c3ff5881c

View File

@@ -128,7 +128,9 @@ class FilterHandler extends AbstractHandler
} }
} }
$this->getHandler(count($filtered) > 0 ? $filtered[count($filtered) - 1] : null)->handleBatch($filtered); if (count($filtered) > 0) {
$this->getHandler($filtered[count($filtered) - 1])->handleBatch($filtered);
}
} }
/** /**