You are here

function twig_ensure_traversable in Translation template extractor 7.3

Same name and namespace in other branches
  1. 6.3 vendor/Twig/Extension/Core.php \twig_ensure_traversable()

@internal

File

vendor/Twig/Extension/Core.php, line 1378

Code

function twig_ensure_traversable($seq) {
  if ($seq instanceof Traversable || is_array($seq)) {
    return $seq;
  }
  return array();
}