ID:               34544
 Updated by:       [EMAIL PROTECTED]
 Reported By:      panard at inzenet dot org
-Status:           Open
+Status:           Feedback
 Bug Type:         *General Issues
 Operating System: Linux
 PHP Version:      5.0.5
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip


Previous Comments:
------------------------------------------------------------------------

[2005-09-18 23:36:55] panard at inzenet dot org

Description:
------------
when the registered shutdown_function is called, headers 
are already sent and they only contain : 
"X-Powered-By" 

Reproduce code:
---------------
<?php

function print_document() {
        if ( headers_sent() ) {
                var_dump( headers_list() );
        }
        header( "Content-Type: text/xml" );
}
register_shutdown_function( 'print_document' );

?>

Expected result:
----------------
No warning  

Actual result:
--------------
array(1) { [0]=> string(12) "X-Powered-By" }   
 Warning: Cannot modify header information - headers  
already sent by (output started  
at /home/panard/public_html/bugs/register_shutdown_function.php:5)  
in /home/panard/public_html/bugs/register_shutdown_function.php 
on line 7 


------------------------------------------------------------------------


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

Reply via email to