Edit report at http://bugs.php.net/bug.php?id=51367&edit=1
ID: 51367 User updated by: lefevre dot 10 at osu dot edu Reported by: lefevre dot 10 at osu dot edu Summary: flush() doesn't inform headers_sent()'s filename or linenumber values Status: Open Type: Bug Package: Output Control PHP Version: 5.2.13 New Comment: Change the '1 = 1' to '$a = 1' in test script ;) Previous Comments: ------------------------------------------------------------------------ [2010-03-23 18:43:25] lefevre dot 10 at osu dot edu Description: ------------ If flush() is called, a subsequent call to headers_sent() with $filename and $linenumber specified does not bind the actual file name and line number of the line where flush() appeared. Instead the values are empty string and 0, respectively. Test script: --------------- <? 1 = 1; flush(); if ( headers_sent( $file, $line) ) { echo "Headers sent at $file: $line<br>"; } echo "Some text here.<br>"; if ( headers_sent( $file, $line) ) { echo "Headers sent at $file: $line<br>"; } Expected result: ---------------- Headers sent at '/var/www/flush_test.php', line 5. Some text here. Headers sent at '/var/www/flush_test.php', line 8. Actual result: -------------- Headers sent at '', line 0. Some text here. Headers sent at '/var/www/flush_test.php', line 8. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51367&edit=1