8000 [VarDumper] returns a 500 when dd() is executed · JohJohan/symfony@8c3d3a0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c3d3a0

Browse files
committed
[VarDumper] returns a 500 when dd() is executed
1 parent 1c1e2d9 commit 8c3d3a0

File tree

1 file changed

+4
-0
lines changed
  • src/Symfony/Component/VarDumper/Resources/functions

1 file changed

+4
-0
lines changed

src/Symfony/Component/VarDumper/Resources/functions/dump.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ function dump($var, ...$moreVars)
3737
*/
3838
function dd(...$vars)
3939
{
40+
if (!in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !headers_sent()) {
41+
header('HTTP/1.1 500 Internal Server Error');
42+
}
43+
4044
foreach ($vars as $v) {
4145
VarDumper::dump($v);
4246
}

0 commit comments

Comments
 (0)
0