Ensure PrintNode is yielding string content

This commit is contained in:
Christophe Coevoet
2026-02-26 16:32:37 +01:00
committed by Fabien Potencier
parent 4cc1afe067
commit 86840f9351
+1 -1
View File
@@ -36,7 +36,7 @@ class PrintNode extends Node implements NodeOutputInterface, CoercesChildrenToSt
$compiler
->addDebugInfo($this)
->write($expr->isGenerator() ? 'yield from ' : 'yield ')
->write($expr->isGenerator() ? 'yield from ' : 'yield (string) ')
->subcompile($expr)
->raw(";\n")
;