#5327 closed defect (bug) (invalid)
Possible stupid bug of the plugin system
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | blocker | Version: | 2.3.1 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description ¶
I have just wasted 4+ hours because WP breaks horribly without any warning or error message when there is more than one empty line under the last ?>
tag in the source code of a plugin. I found out about this accidentally while trying desperately to fix a problem with a plugin of mine.
Can anybody confirm this?
The only thing I do not want to read is that it is a feature or a necessary evil or anything similar... Thanks
Pull Requests
- Loading…
Change History (6)
#4
@
17 years ago
Why?
Most likely what happened was that you have display_errors set to '0', which is why no errors or warnings came up. If you had turned it on, you most likely would have received an error about trying to send headers after they were already sent (Most common cause of this happening).
All languages are going to have little "gotchas" that you have to figure out. It technically isn't a PHP issue either, since it is the expected behavior and documented.
This isn't a WordPress issue. It is a PHP issue. It is a common problem with a known solution. All WordPress files must not have more than one empty line (none would be better).
If you remove the
?>
from PHP only files, it would prevent this from happening again.