You are here

function twig_ensure_traversable in Zircon Profile 8

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

@internal

File

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

Code

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