Skip to content

Commit

Permalink
fixes for PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Sep 13, 2019
1 parent f98616e commit eb59baf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tracy/Debugger/Debugger.php
Expand Up @@ -262,7 +262,7 @@ public static function shutdownHandler(): void
self::$reserved = null;

$error = error_get_last();
if (in_array($error['type'], [E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE, E_RECOVERABLE_ERROR, E_USER_ERROR], true)) {
if (in_array($error['type'] ?? null, [E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE, E_RECOVERABLE_ERROR, E_USER_ERROR], true)) {
self::exceptionHandler(
Helpers::fixStack(new ErrorException($error['message'], 0, $error['type'], $error['file'], $error['line'])),
false
Expand Down
1 change: 1 addition & 0 deletions tests/Tracy/Debugger.E_RECOVERABLE_ERROR.phpt
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Tracy\Debugger E_RECOVERABLE_ERROR error.
* @phpversion < 7.4
*/

declare(strict_types=1);
Expand Down

0 comments on commit eb59baf

Please sign in to comment.