Skip to content

Commit 0ab866b

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: Fix possible error code
2 parents 6347f1d + b01a241 commit 0ab866b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service_container/tags.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ array element. For example, to retrieve the ``handler_two`` handler::
796796
{
797797
public function __construct(iterable $handlers)
798798
{
799-
$handlers = iterator_to_array($handlers);
799+
$handlers = $handlers instanceof \Traversable ? iterator_to_array($handlers) : $handlers;
800800

801801
$handlerTwo = $handlers['handler_two'];
802802
}

0 commit comments

Comments
 (0)