简体   繁体   中英

FOS UserBundle and Twig Error

recently I've been trying to install FOSUserBundle with my Symfony 2.1 application. I went through the installation and configuration process with no errors. However, when I typed myapp/app_dev.php/login path into browser address bar, I got a following error:

ErrorException: Warning: array_key_exists() expects parameter 2 to be array, null given in /home/kasia/WWW/herold-statistik/vendor/symfony/symfony/src/Symfony/Bridge/Twig/NodeVisitor/Scope.php line 94

This error seems to appear on every subpage that uses FOS templates . It only disappears when {% extends %} and {% block %} tags are removed from Twig files. Overriding templates didn't work for me.

I will appreciate any help. Thanks.

The problem is not from the FOSUserBundle . It's from a fix of the TwigBridge . There is a pending PR but you can fix it manually look here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM