From 49129c1dd91f13148942ea73554344dbcfaffdfe Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Thu, 26 Feb 2026 16:32:37 +0100 Subject: [PATCH] Ensure PrintNode is yielding string content --- src/Node/PrintNode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Node/PrintNode.php b/src/Node/PrintNode.php index e3c23bbfa1c..63fa498a14e 100644 --- a/src/Node/PrintNode.php +++ b/src/Node/PrintNode.php @@ -36,7 +36,7 @@ public function compile(Compiler $compiler): void $compiler ->addDebugInfo($this) - ->write($expr->isGenerator() ? 'yield from ' : 'yield ') + ->write($expr->isGenerator() ? 'yield from ' : 'yield (string) ') ->subcompile($expr) ->raw(";\n") ;