From 91b1a9e5fb2fdefb017e73efac80c8badc6202ee Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Wed, 8 Nov 2023 16:15:11 +0100 Subject: [PATCH] Fix passing null to `str_starts_with()` --- src/BacktraceProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BacktraceProcessor.php b/src/BacktraceProcessor.php index 36165ee..eebcf24 100644 --- a/src/BacktraceProcessor.php +++ b/src/BacktraceProcessor.php @@ -34,7 +34,7 @@ public function __invoke(LogRecord $record): LogRecord } $class = $call['class'] ?? null; - if (\str_contains($file, self::MONOLOG_VENDOR_DIRNAME) || \str_starts_with($class, 'MonologProcessorCollection\\')) { + if (\str_contains($file, self::MONOLOG_VENDOR_DIRNAME) || null !== $class && \str_starts_with($class, 'MonologProcessorCollection\\')) { continue; }