Blank lines in PHP files (note: not an RSS feed issue)
Long-time user, first-time poster. I run a WordPress site, the RSS feed of which used to suffer from the infamous ‘blank line’ problem. It now validates, but the problem has reared its ugly head in a different context and left me browsing forums, unsuccessfully, for the past two mornings.
The short of it: We’re still getting a blank line. It doesn’t affect the RSS feed, curiously enough, but the good folks at Camayak still can’t connect via XML-RPC.
I’m quite content to code up a general solution and do away with this problem once and for all, but I’ve yet to find any consensus as to what ultimately throws WordPress for a loop. Most folks (including those at Camayak with whom I’ve been in contact) seem to think that only leading and trailing blank lines cause the error, while others recommend deleting all blank lines not enclosed by PHP tags. Some have recommended adding closing tags to the end of each file.
Now, I’ve already gone through my plug-ins, theme files, and certain of the WordPress internals (e.g., wp-config.php and wp-includes/*), deleting leading and trailing lines and adding end tags, but the problem remains. Either I’ve overlooked something, or it would seem that all unencapsulated blank lines are verboten. Would any authorities on the issue care to enlighten me?
Thanks much in advance,
P.S. — Apologies in advance if folks feel that this belongs in the plug-ins and hacks forum instead. It seemed a general enough question, albeit one motivated by a particular plug-in’s misbehavior.
- The topic ‘Blank lines in PHP files (note: not an RSS feed issue)’ is closed to new replies.