Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twig template falis to render in strict_variables mode #242

Open
GKFX opened this issue May 29, 2020 · 0 comments
Open

Twig template falis to render in strict_variables mode #242

GKFX opened this issue May 29, 2020 · 0 comments

Comments

@GKFX
Copy link

GKFX commented May 29, 2020

{% if attr.options.size == 'invisible' and attr.options.callback is not defined %}

contains a reference to attr.options.size which is not necessarily defined. If running Twig with strict_variables set to true this causes a crash. It should read

{% if attr.options.size ?? null == 'invisible' and attr.options.callback is not defined %}

and line 38:

<div class="g-recaptcha" data-theme="{{ attr.options.theme ?? ''}}" data-size="{{ attr.options.size ?? ''}}" data-type="{{ attr.options.type ?? ''}}" data-sitekey="{{ form.vars.public_key }}"

in order to function in this environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant