Skip to content

Commit a60e015

Browse files
committed
[VarDumper] returns a 500 when dd() is executed
1 parent 930a70c commit a60e015

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)