Skip to content

Commit

Permalink
Debugger::errorHandler() argument $context can be null [Closes #379]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 19, 2019
1 parent 1db4afc commit 61180c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tracy/Debugger/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 61180c1

Please sign in to comment.