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

This commit is contained in:
Ad van der Veer
2010-02-22 16:38:17 +01:00
committed by Fabien Potencier
parent d2b44781e3
commit cf09f2644b
+1 -1
View File
@@ -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);
}