From: Ad van der Veer Date: Mon, 22 Feb 2010 15:38:17 +0000 (+0100) Subject: Twig_Extension_Core is registration is hardcoded in to the Environment Extensions... X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=cf09f2644b7913ef5d32f14f0b782df87a2d27a9;p=konrad%2Ftwig.git Twig_Extension_Core is registration is hardcoded in to the Environment Extensions array at key 0 while it should be registered at key core as can be seen in the addExtension method --- diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index 76eb3d7..7ec122c 100644 --- a/lib/Twig/Environment.php +++ b/lib/Twig/Environment.php @@ -69,7 +69,7 @@ class Twig_Environment $this->charset = isset($options['charset']) ? $options['charset'] : 'UTF-8'; $this->baseTemplateClass = isset($options['base_template_class']) ? $options['base_template_class'] : 'Twig_Template'; $this->autoReload = isset($options['auto_reload']) ? (bool) $options['auto_reload'] : $this->debug; - $this->extensions = array(new Twig_Extension_Core()); + $this->extensions = array('core' => new Twig_Extension_Core()); $this->runtimeInitialized = false; $this->setCache(isset($options['cache']) ? $options['cache'] : null); }