Skip to content

Commit 7cbb80a

Browse files
AlliBalliBabaa.stecher
andauthored
FrankenPHP: show worker startup errors if APP_DEBUG=true (#1055)
* Explicitly checks for debug mode on error. * Explicitly checks for debug mode on worker start error. * style ci --------- Co-authored-by: a.stecher <[email protected]>
1 parent 4a46a6c commit 7cbb80a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/frankenphp-worker.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@
5656
report($e);
5757
}
5858

59+
$debugMode = $_ENV['APP_DEBUG'] ?? $_SERVER['APP_DEBUG'] ?? 'false';
60+
5961
$response = new Response(
60-
'Internal Server Error',
62+
$debugMode === 'true' ? (string) $e : 'Internal Server Error',
6163
500,
6264
[
6365
'Status' => '500 Internal Server Error',

0 commit comments

Comments
 (0)