Redirect error

Issue #2 resolved
Brendan Strohmeier-Parmer created an issue

When used with redirects in an instance I can't really replicate offline, the website first redirects to a blank page, then the actual target.

While I wasn't able to reproduce this offline, I was able to figure out why it happened.

http://stackoverflow.com/questions/24977058/blank-page-redirecting-to-message

Pretty much, many of your files have

?>
// line break here

Removing the closing tag, and the line break after it fixed everything(I did this in every file I found it in). Now, I'm guessing this happened because any extra content after the closing tag is usually interpreted as content to send, sending headers before output starts, thus breaking everything.

I fixed it in my copy of course, but that's not really future-proof, so I'm reporting this.

Comments (3)

  1. Simon Hampel repo owner

    Thanks for pointing this out - I recently discovered that my (slightly OCD) habbit of putting ?> at the end of my php files was responsible for all sorts of weirdness I was seeing in my apps - especially if I wasn't really careful about additional whitespace before the EOF.

    I hadn't got around to cleaning up my packages yet - will make that a priority

  2. Log in to comment