1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-07-30 09:50:26 +02:00

Fix ErrorHandler::handleError $context signature (#1614)

The context can be null, eg. for internal PHP errors.
This commit is contained in:
Koen Kivits
2022-03-07 14:11:30 +01:00
committed by GitHub
parent c0ae588437
commit 16cc886c02

View File

@@ -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;