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

Fatal error: @image($id, 'size') causing syntax error from trailing parameter comma. #40

Closed
christianmagill opened this issue Jun 5, 2020 · 3 comments · Fixed by #82
Labels
bug Something isn't working

Comments

@christianmagill
Copy link

When I use the @image directive like such...

@image($image, $image_size)

It generates the following code...

    <?php echo wp_get_attachment_image(
                $image,
                $image_size,
                false,
              
            ); ?>

This causes a fatal error on my server due to the trailing comma:

Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: syntax error, unexpected ')'

@Log1x
Copy link
Owner

Log1x commented Jun 5, 2020

Yeah, that requires PHP 7.2 if I recall. My mistake.

Care to do a PR?

@christianmagill
Copy link
Author

I don't have much experience with creating directives, but I'll take a look.

@christianmagill
Copy link
Author

I ended up just upping my PHP version to fix the issue.

@Log1x Log1x added the bug Something isn't working label Jul 21, 2020
@Log1x Log1x mentioned this issue Jul 29, 2023
@Log1x Log1x closed this as completed in #82 Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants