From 16cc886c02048869a5e2eb7c17db9ab4ea5e168d Mon Sep 17 00:00:00 2001 From: Koen Kivits Date: Mon, 7 Mar 2022 14:11:30 +0100 Subject: [PATCH] Fix ErrorHandler::handleError $context signature (#1614) The context can be null, eg. for internal PHP errors. --- src/Monolog/ErrorHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monolog/ErrorHandler.php b/src/Monolog/ErrorHandler.php index e7d244bb..16794be6 100644 --- a/src/Monolog/ErrorHandler.php +++ b/src/Monolog/ErrorHandler.php @@ -210,7 +210,7 @@ class ErrorHandler * * @param mixed[] $context */ - public function handleError(int $code, string $message, string $file = '', int $line = 0, array $context = []): bool + public function handleError(int $code, string $message, string $file = '', int $line = 0, ?array $context = []): bool { if ($this->handleOnlyReportedErrors && !(error_reporting() & $code)) { return false;