From 288ba6789e2c37bae263ff02b0c13bcef4fa7b82 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 6 Jul 2010 16:11:56 +0200 Subject: [PATCH] fixed typos --- lib/Twig/Template.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Twig/Template.php b/lib/Twig/Template.php index cdea823..7643758 100644 --- a/lib/Twig/Template.php +++ b/lib/Twig/Template.php @@ -116,7 +116,7 @@ abstract class Twig_Template implements Twig_TemplateInterface $class = get_class($object); if (!isset(self::$cache[$class])) { $r = new ReflectionClass($class); - self::$cache[$class] = array(); + self::$cache[$class] = array('methods' => array(), 'properties' => array()); foreach ($r->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { self::$cache[$class]['methods'][strtolower($method->getName())] = true; } @@ -128,7 +128,7 @@ abstract class Twig_Template implements Twig_TemplateInterface // object property if (Twig_Node_Expression_GetAttr::TYPE_METHOD !== $type) { - if (isset(self::$cache[$class]['properties'][$item]) || isset($object->$item)) { + if (isset(self::$cache[$class]['properties'][strtolower($item)]) || isset($object->$item)) { if ($this->env->hasExtension('sandbox')) { $this->env->getExtension('sandbox')->checkPropertyAllowed($object, $item); } -- 1.7.2.5