mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-08 00:17:29 +00:00
simplify an iterable check
This commit is contained in:
@@ -926,7 +926,7 @@ final class CoreExtension extends AbstractExtension
|
||||
return $item;
|
||||
}
|
||||
|
||||
if ($item instanceof \Traversable || \is_array($item)) {
|
||||
if (is_iterable($item)) {
|
||||
$item = self::toArray($item, false);
|
||||
shuffle($item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user