Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Tracy/Debugger/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,12 @@ public static function exceptionHandler(\Throwable $exception): void
require self::$errorTemplate ?: __DIR__ . '/assets/error.500.phtml';
})(empty($e));
} elseif (PHP_SAPI === 'cli') {
@fwrite(STDERR, 'ERROR: application encountered an error and can not continue. '
. (isset($e) ? "Unable to log error.\n" : "Error was logged.\n")); // @ triggers E_NOTICE when strerr is closed since PHP 7.4
// @ triggers E_NOTICE when strerr is closed since PHP 7.4

@Ciki Ciki Jun 7, 2021

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dg there's a typo strerr should be stderr

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

serepes

@fwrite(STDERR, "ERROR: {$exception->getMessage()}\n"
. (isset($e)
? 'Unable to log error. You may try enable debug mode to inspect the problem.'
: 'Check log to see more info.')
. "\n");
}

} elseif ($firstTime && Helpers::isHtmlMode() || Helpers::isAjax()) {
Expand Down