Skip to content
Permalink
Browse files

Debugger::errorHandler() argument $context can be null [Closes #379]

  • Loading branch information...
dg committed Aug 19, 2019
1 parent 1db4afc commit 61180c13da58ba3be2c8fa01cc54ab65b1219ff8
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Tracy/Debugger/Debugger.php
@@ -361,7 +361,7 @@ public static function exceptionHandler(\Throwable $exception, bool $exit = true
* @throws ErrorException
* @internal
*/
public static function errorHandler(int $severity, string $message, string $file, int $line, array $context = []): ?bool
public static function errorHandler(int $severity, string $message, string $file, int $line, array $context = null): ?bool
{
if (self::$scream) {
error_reporting(E_ALL);
@@ -403,7 +403,7 @@ public static function errorHandler(int $severity, string $message, string $file
self::exceptionHandler($e);
}
$message = 'PHP ' . Helpers::errorTypeToString($severity) . ': ' . Helpers::improveError($message, $context);
$message = 'PHP ' . Helpers::errorTypeToString($severity) . ': ' . Helpers::improveError($message, (array) $context);
$count = &self::getBar()->getPanel('Tracy:errors')->data["$file|$line|$message"];
if ($count++) { // repeated error

0 comments on commit 61180c1

Please sign in to comment.
You can’t perform that action at this time.