ID:               29125
 User updated by:  justin at onyourmark dot com
 Reported By:      justin at onyourmark dot com
 Status:           Open
 Bug Type:         Output Control
 Operating System: FreeBSD 4.10-STABLE
 PHP Version:      4.3.4
 New Comment:

<?php
ob_start('ob_gzhandler');
echo 'should not be shown';
ob_clean();
echo 'should be shown';
ob_end_flush();
?>

This also results in nothing being displayed. Removing the ob_gzhandler
results in the proper output of 'should be shown'.


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

[2004-07-13 22:06:07] justin at onyourmark dot com

Incorrect initial listing of PHP version. Correct now.

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

[2004-07-13 21:55:31] justin at onyourmark dot com

Description:
------------
The output buffer stops working if:
1) the output buffer was started with ob_start('ob_gzhandler');
2) a ob_clean() call is made from within a function.

Any subsequent ob_flush()/ob_end_flush()/ob_get_contents(), ect results
in nothing being returned.

Bug #24951 seems to be similar to the problem I'm having. I'll run
similar tests and report back the results, unless the issue is
positivly identified before I finish the tests.

Reproduce code:
---------------
<?php
ob_start('ob_gzhandler');
echo "Shouldn't be displayed<br>";
test("Should be displayed<br>\n");
echo "Should be displayed too<br>";
ob_end_flush();

function test($str)
{
        ob_clean();
        echo $str;
}
?>

Expected result:
----------------
Should be displayed<br>
Should be displayed too<br>



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


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

Reply via email to