From c25913eabd6295345aef00ffde4296aed3fda441 Mon Sep 17 00:00:00 2001 From: fabien Date: Sat, 17 Oct 2009 11:56:28 +0000 Subject: [PATCH] made a small optimization (closes #12, thanks to tedivm) git-svn-id: http://svn.twig-project.org/trunk@67 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- lib/Twig/Template.php | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/lib/Twig/Template.php b/lib/Twig/Template.php index f22b0ce..50629e8 100644 --- a/lib/Twig/Template.php +++ b/lib/Twig/Template.php @@ -47,11 +47,7 @@ abstract class Twig_Template implements Twig_TemplateInterface { $item = (string) $item; - if ( - is_array($object) && isset($object[$item]) - || - is_object($object) && $object instanceof ArrayAccess && isset($object[$item]) - ) + if ((is_array($object) || is_object($object) && $object instanceof ArrayAccess) && isset($object[$item])) { return $object[$item]; } -- 1.7.2.5