You are here

function twig_ensure_traversable in Translation template extractor 6.3

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

File

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

Code

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