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

Missing PHP closing tag in @hasposts directive #34

Closed
ethicka opened this issue Mar 31, 2020 · 1 comment
Closed

Missing PHP closing tag in @hasposts directive #34

ethicka opened this issue Mar 31, 2020 · 1 comment

Comments

@ethicka
Copy link
Contributor

ethicka commented Mar 31, 2020

I get the following error when using @hasposts and @endhasposts with a passed query e.g. @hasposts($query).

Uncaught Exception: syntax error, unexpected '<', expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF)

It appears there's a missing closing tag on the following line:

"<?php if (\$query->have_posts()) :";

When I directly edited the cached file I added ?> to the end of the line to fix the issue.

@Log1x
Copy link
Owner

Log1x commented Mar 31, 2020

indeed a bug. care to do a PR?

ethicka added a commit to ethicka/sage-directives that referenced this issue Mar 31, 2020
@Log1x Log1x closed this as completed in 063ecd6 Mar 31, 2020
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

2 participants