ID: 26507 User updated by: michael at tapinternet dot com Reported By: michael at tapinternet dot com Status: Bogus Bug Type: Output Control Operating System: debian linux PHP Version: 4.3.4 New Comment:
I worded this wrong, I'm sorry, Dang - I made the whole thing wrong. It's not the 'flush' one it's ob_end_clean(). EXAMPLE: test.php <? $foo=''; ?> <--- note whitespace here bar.php <? include('test.php'); ob_end_clean(); header("Content-type: application/ms-word"); echo "foobar"; ?> ----------------- 'foobar' will have a linebreak *before* it, even though the ob_end_flush() function has been called. ----------------- Please reconsider the above issue. ob_end_clean() (this is what's in the code which was causing us problems after the upgrade) has changed behaviour. I've not made myself clear on this, and that's my fault. EVERYTHING has ob_start() at the top of the controller file, so the example files *only* have the ob_end_clean() in them when needed. This *should* be clearing out everything that's been collected in the output buffer up to that point. Previous versions apparently dealt with the whitespace in any include()d files as well, but this latest version (4.3.4) is breaking where earlier versions (4.3.1 and below) worked. If this behaviour has changed here, what else may have changed as well? Previous Comments: ------------------------------------------------------------------------ [2003-12-02 22:27:38] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php PHP does not trim output. ------------------------------------------------------------------------ [2003-12-02 18:56:59] michael at tapinternet dot com Description: ------------ ob_end_flush used to completely trim all output that had been collected, including whitespace at the end of previously included files. That's not happening after an upgrade to PHP 4.3.4 (from 4.3.1). EXAMPLE: test.php <? $foo=''; ?> <--- note whitespace here bar.php <? include('test.php'); ob_end_flush(); header("Content-type: application/ms-word"); echo "foobar"; ?> 'foobar' will have a linebreak *before* it, even though the ob_end_flush() function has been called. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26507&edit=1