502 Bad Gateway when removing close open php tags
-
This is a bit of a strange one, I’m getting a 502 when removing a close and open php tag in the loop. I can’t see how these make the page work or cause the error when being removed.
This works…
See: ?><?php line 10endwhile; $prevLink = get_previous_post_link(); $nextLink = get_next_post_link(); if ($prevLink != '' || $nextLink != '') { echo '<div class="adjacent-entry-pagination pagination">'; echo '<div class="pagination-previous alignleft">' . $prevLink . '</div>'; echo '<div class="pagination-next alignright">' . $nextLink . '</div></div>'; } ?><?php else :
This throws up a 502…
?><?php removed from line 10endwhile; $prevLink = get_previous_post_link(); $nextLink = get_next_post_link(); if ($prevLink != '' || $nextLink != '') { echo '<div class="adjacent-entry-pagination pagination">'; echo '<div class="pagination-previous alignleft">' . $prevLink . '</div>'; echo '<div class="pagination-next alignright">' . $nextLink . '</div></div>'; } else :
Any insight would be appreciated. It’s not a big deal to leave the ?><?php in, but I’m just a bit concerned there’s a bigger problem going on with my code.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘502 Bad Gateway when removing close open php tags’ is closed to new replies.