From: Fabien Potencier Date: Thu, 13 Jan 2011 09:35:31 +0000 (+0100) Subject: fixed Template::getAttribute() as properties in PHP are case sensitive X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=05f20f88d2b3496af34d1d99ae66450ce8bca866;p=web%2Fkonrad%2Ftwig.git fixed Template::getAttribute() as properties in PHP are case sensitive --- diff --git a/lib/Twig/Template.php b/lib/Twig/Template.php index 829d583..3162807 100644 --- a/lib/Twig/Template.php +++ b/lib/Twig/Template.php @@ -246,13 +246,13 @@ abstract class Twig_Template implements Twig_TemplateInterface } foreach ($r->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { - self::$cache[$class]['properties'][strtolower($property->getName())] = true; + self::$cache[$class]['properties'][$property->getName()] = true; } } // object property if (Twig_Node_Expression_GetAttr::TYPE_METHOD !== $type) { - if (isset(self::$cache[$class]['properties'][strtolower($item)]) || isset($object->$item)) { + if (isset(self::$cache[$class]['properties'][$item]) || isset($object->$item)) { if ($this->env->hasExtension('sandbox')) { $this->env->getExtension('sandbox')->checkPropertyAllowed($object, $item); }