Edit report at http://bugs.php.net/bug.php?id=51367&edit=1

 ID:          51367
 Updated by:  [email protected]
 Reported by: lefevre dot 10 at osu dot edu
 Summary:     flush() doesn't inform headers_sent()'s filename or
              linenumber values
-Status:      Open
+Status:      Feedback
 Type:        Bug
 Package:     Output Control
 PHP Version: 5.2.13

 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

headers_sent() after flush() returns FALSE for me.


Previous Comments:
------------------------------------------------------------------------
[2010-03-23 18:46:36] lefevre dot 10 at osu dot edu

Change the '1 = 1' to '$a = 1' in test script ;)

------------------------------------------------------------------------
[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

Reply via email to