Skip to content

Commit

Permalink
Fixed issue #15446: Custom Twig extensions do not work
Browse files Browse the repository at this point in the history
  • Loading branch information
lime-marc committed Dec 17, 2019
1 parent c35b94b commit 766a394
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions third_party/Twig/ETwigViewRenderer.php
Expand Up @@ -221,8 +221,8 @@ public function addExtensions($extensions)
public function addUserExtensions($extensions)
{
foreach ($extensions as $extName) {
Yii::setPathOfAlias('extName', Yii::app()->getConfig('usertwigextensionrootdir') .'/'. $extName .'/');
Yii::import( "extName.*" );
Yii::setPathOfAlias('extName_'.$extName, Yii::app()->getConfig('usertwigextensionrootdir') .'/'. $extName .'/');
Yii::import( "extName_".$extName.".*" );
$this->_twig->addExtension(new $extName());
}
}
Expand Down

0 comments on commit 766a394

Please sign in to comment.