You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Too few arguments to function __TwigTemplate_e2e6dd84c91e95ce276fd9aafe10abd0::{closure}(), 1 passed in /var/www/html/vendor/shopware/core/Framework/Adapter/Twig/SecurityExtension.php on line 54 and exactly 2 expected
The SecurityExtension ignores the fact that Twigs map function closure can take up to 2 arguments - see Twig Docs
Actual behaviour
The twig compiler should not fail, map is an allowed function and should work as expected.
PHP Version
Any
Shopware Version
6.5.8.6 / trunk
Expected behaviour
Consider the following twig template in storefront, reduced for clarity:
This will fail with an exception from SecurityExtension
Too few arguments to function __TwigTemplate_e2e6dd84c91e95ce276fd9aafe10abd0::{closure}(), 1 passed in /var/www/html/vendor/shopware/core/Framework/Adapter/Twig/SecurityExtension.php on line 54 and exactly 2 expected
The SecurityExtension ignores the fact that Twigs map function closure can take up to 2 arguments - see Twig Docs
Actual behaviour
The twig compiler should not fail, map is an allowed function and should work as expected.
How to reproduce
Run the twig template in the storefront:
The text was updated successfully, but these errors were encountered: