Commit b44a9007 by Alexander Makarov

Fixes Twig to ignore non-path aliases instead of erroring

parent 41f31bcd
......@@ -146,8 +146,10 @@ class ViewRenderer extends BaseViewRenderer
$loader = new \Twig_Loader_Filesystem(dirname($file));
foreach (Yii::$aliases as $alias => $path) {
if (is_dir($path)) {
$loader->addPath($path, substr($alias, 1));
}
}
$this->twig->setLoader($loader);
return $this->twig->render(pathinfo($file, PATHINFO_BASENAME), $params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment