Selaa lähdekoodia

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

The context can be null, eg. for internal PHP errors.
Koen Kivits 3 vuotta sitten
vanhempi
commit
16cc886c02
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/Monolog/ErrorHandler.php

+ 1 - 1
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;