|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-27 10:08 UTC] tony2001@php.net
[2006-11-30 08:23 UTC] robert dot tuley at imperial dot ac dot uk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 15:00:01 2025 UTC |
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.