Skip to content

Commit

Permalink
Fix passing null to str_starts_with()
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Nov 8, 2023
1 parent b809a72 commit 91b1a9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BacktraceProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 91b1a9e

Please sign in to comment.