fix: #4029 when use_yield is true CaptureNode use iterator_to_array preserveKeys argument to false

This commit is contained in:
Gildas de Cadoudal
2024-04-18 09:45:09 +02:00
parent 7d2b814e6c
commit f7121a23bc
4 changed files with 19 additions and 3 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ EOF
// line 1
\$context["foo"] = ('' === \$tmp = implode('', iterator_to_array((function () use (&\$context, \$macros, \$blocks) {
yield "foo";
})() ?? new \EmptyIterator()))) ? '' : new Markup(\$tmp, \$this->env->getCharset());
})() ?? new \EmptyIterator(), false))) ? '' : new Markup(\$tmp, \$this->env->getCharset());
EOF
, new Environment(new ArrayLoader()),
];