diff --git a/src/bind.inc.php b/src/bind.inc.php index 39c6a08..3eef75a 100644 --- a/src/bind.inc.php +++ b/src/bind.inc.php @@ -17,12 +17,15 @@ class BindEclLitePlugin implements \bhl_bind\BindPlugin function init(\mtgMetaInfo $meta, \Twig\Environment $twig) { $loader = $twig->getLoader(); - $loader->setPaths( - array_merge( - $loader->getPaths(), - [__DIR__ . "/../tpl"] - ) - ); + if($loader instanceof \Twig\Loader\FilesystemLoader) + { + $loader->setPaths( + array_merge( + $loader->getPaths(), + [__DIR__ . "/../tpl"] + ) + ); + } //let's collect units we're responsible for foreach($meta->getUnits() as $u)