prevent inadvertent output from included files
|Reported by:||mm6||Owned by:|
A couple days ago I accidentally broke all my feeds and XMLRPC by introducing a newline in my theme's functions.php file. This caused a newline before the xml declaration in the generated XML which breaks XML parsers.
It got me thinking if there was a way to ignore the output from an included file that should never generate any output. What if the include was wrapped in this?
ob_start() include(STYLESHEETPATH . '/functions.php'); ob_end_clean()
If anyone thinks is a good idea I can make a patch.
Change History (10)
9 years ago
- Milestone 2.7 deleted
- Resolution set to invalid
- Status changed from new to closed