ID:               39629
 Updated by:       [EMAIL PROTECTED]
 Reported By:      robert dot tuley at imperial dot ac dot uk
-Status:           Open
+Status:           Feedback
 Bug Type:         Output Control
 Operating System: winXP
 PHP Version:      5.2.0
 New Comment:

Please try using this CVS snapshot:

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

Cannot reproduce.
I get no crash, but the expected result instead.


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

[2006-11-25 19:32:58] robert dot tuley at imperial dot ac dot uk

Description:
------------
Trying to clean the buffer in a custom error handler causes script exit
when that buffer has 'ob_gzhandler' as a handler. The behaviour is
consistent for both PHP5 and PHP4. Note that the example works
correctly if there is no callback function specified in the call to
ob_start(). 

Reproduce code:
---------------
// set error handler
function errorHandler($code,$string,$filename,$line,$scope) {
    ob_end_clean();
    die('should reach here');
}
set_error_handler('errorHandler');

// use ob_gzhandler to buffer page
ob_start('ob_gzhandler');
echo 'some output';
trigger_error('encounters error',E_USER_ERROR);

Expected result:
----------------
should reach here

Actual result:
--------------
No output.


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


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

Reply via email to