Skip to content

Commit af6f14e

Browse files
committed
Don't call method_exists() with non-objects.
1 parent 9663805 commit af6f14e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DependencyInjection/Compiler/AddDebugLogProcessorPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function process(ContainerBuilder $container)
3636

3737
public static function configureLogger($logger)
3838
{
39-
if (method_exists($logger, 'removeDebugLogger') && \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
39+
if (\is_object($logger) && method_exists($logger, 'removeDebugLogger') && \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
4040
$logger->removeDebugLogger();
4141
}
4242
}

0 commit comments

Comments
 (0)