We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edbdfdd commit d5da6c9Copy full SHA for d5da6c9
src/agent/src/Toolbox/StreamResult.php
@@ -39,10 +39,12 @@ public function getContent(): \Generator
39
}
40
41
$content = $innerResult->getContent();
42
- if ($content instanceof \Generator || $content instanceof \Iterator || (is_array($content))) {
43
- yield from $content;
44
- } else {
+ // Strings are iterable in PHP but should be yielded as single values
+ // null should also be yielded as-is
+ if (is_string($content) || null === $content) {
45
yield $content;
46
+ } else {
47
+ yield from $content;
48
49
50
break;
0 commit comments