first argument of Twig_Loader_Array must be an array

This commit is contained in:
maxstekel
2014-10-23 11:29:06 +02:00
parent 79333cc8e3
commit 435534ef05
+2 -2
View File
@@ -50,9 +50,9 @@ This section gives you a brief introduction to the PHP API for Twig.
require_once '/path/to/vendor/autoload.php';
$loader = new Twig_Loader_Array(
$loader = new Twig_Loader_Array(array(
'index' => 'Hello {{ name }}!',
);
));
$twig = new Twig_Environment($loader);
echo $twig->render('index', array('name' => 'Fabien'));