Attempt to fix strange race condition.

This commit is contained in:
flash 2018-01-03 21:07:30 +01:00
parent 61700fa782
commit 595a4f3744

View file

@ -109,11 +109,10 @@ class ExceptionHandler
*/ */
private static function render(Throwable $exception, bool $reported): void private static function render(Throwable $exception, bool $reported): void
{ {
$in_cli = PHP_SAPI === 'cli';
$is_http = false;//$exception instanceof HttpException; $is_http = false;//$exception instanceof HttpException;
if ($in_cli || (!$is_http && static::$debugMode)) { if (PHP_SAPI === 'cli' || (!$is_http && static::$debugMode)) {
if (!$in_cli) { if (PHP_SAPI !== 'cli') {
http_response_code(500); http_response_code(500);
header('Content-Type: text/plain'); header('Content-Type: text/plain');
} }