Merge branch '1.x' into 2.x

* 1.x:
  fixed CS
This commit is contained in:
Fabien Potencier
2019-04-08 13:04:15 +02:00
+1 -1
View File
@@ -652,7 +652,7 @@ function twig_slice(Environment $env, $item, $start, $length = null, $preserveKe
if ($start >= 0 && $length >= 0 && $item instanceof \Iterator) {
try {
return iterator_to_array(new \LimitIterator($item, $start, null === $length ? -1 : $length), $preserveKeys);
} catch (\OutOfBoundsException $exception) {
} catch (\OutOfBoundsException $e) {
return [];
}
}