From 70cca66c5a03d514983d84b5d678b461977d49a7 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 13 Apr 2012 14:22:03 +0200 Subject: [PATCH] Simplify code --- lib/Twig/Extension/Core.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index 14fbca7..2b54a5c 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -986,7 +986,7 @@ else /* used internally */ function twig_ensure_traversable($seq) { - if (is_array($seq) || (is_object($seq) && $seq instanceof Traversable)) { + if (is_array($seq) || $seq instanceof Traversable) { return $seq; } else { return array(); @@ -1032,5 +1032,5 @@ function twig_test_empty($value) */ function twig_test_traversable($value) { - return is_array($value) || (is_object($value) && $value instanceof Traversable); + return is_array($value) || $value instanceof Traversable; } -- 1.7.2.5