fixed partial output leak when a PHP fatal error occurs

This commit is contained in:
Fabien Potencier
2019-05-03 06:20:17 +02:00
parent d3acd0bede
commit 6196fe5b40
10 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ class SpacelessNode extends Node
{
$compiler
->addDebugInfo($this)
->write("ob_start();\n")
->write("ob_start(function () { return ''; });\n")
->subcompile($this->getNode('body'))
->write("echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));\n")
;