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

Not setting options for {% element %} throws error #49

Closed
edggk opened this issue Mar 10, 2017 · 2 comments
Closed

Not setting options for {% element %} throws error #49

edggk opened this issue Mar 10, 2017 · 2 comments

Comments

@edggk
Copy link
Contributor

edggk commented Mar 10, 2017

Hi,

if you don't set options for element it will fail as it passes null to $compiler->subcompile()

in Lib\Twig\Node\Element.php
line: 65

$options = $this->getNode('options');
if ($data!== null) {
    $compiler->raw(',');
     $compiler->subcompile($options);
}

I think it should check for $options not $data.

Thanks.

@WyriHaximus
Copy link
Collaborator

Good point 👍 , could you make a PR, don't have time to test and fix it right now

@ADmad
Copy link
Member

ADmad commented Oct 19, 2017

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

4 participants