From: Operating system: PHP version: 5.2.13 Package: Output Control Bug Type: Bug Bug description:flush() doesn't inform headers_sent()'s filename or linenumber values
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 bug report at http://bugs.php.net/bug.php?id=51367&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51367&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51367&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51367&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51367&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51367&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51367&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51367&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51367&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51367&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51367&r=support Expected behavior: http://bugs.php.net/fix.php?id=51367&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51367&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51367&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51367&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51367&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51367&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51367&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51367&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51367&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51367&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51367&r=mysqlcfg