Jani Taskinen wrote:
>>> Dmitry Stogov wrote:
>>>> Hi,
>>>>
>>>> Attached is a proposed fix for http://bugs.php.net/bug.php?id=45392 for
>>>> PHP_5_3. I don't know output buffering part very well, and I'm not
>>>> completely sure about this fix, so please review it.
>>>>
>>>> The patch changes behavior of output buffering a bit. In case of fatal
>>>> error all output buffers opened by ob_start() with zero (or omitted)
>>>> chunk_size argument are discarded. The fix brakes two tests:
>>>>
>>>> Test session_module_name() function : variation
>>>> [ext/session/tests/session_module_name_variation3.phpt]
>>>> Test session_set_save_handler() function : error functionality
>>>> [ext/session/tests/session_set_save_handler_error3.phpt]
>>>>
>>>> We need to make a decision about #45392.
>>>>
>>>> 1) Fix it with proposed (or similar) patch
>>>>
>>>> 2) Make it bogus because any fix requires output buffering behavior
>>>> change
> 
> Sorry for top-posting. Anyway, reading the patch made me think that
> maybe in the user/recoverable cases the output buffer should not be
> discarded like this..?
> 
> And IMO, it's a bug, bugs should be fixed even if it means changing the
> behaviour in an _edge_ case.

I'm not so sure as http://www.php.net/manual/en/function.ob-start.php
doesn't make difference between successful and unsuccessful request and
assumes "output buffer is flushed to the browser at the end of the request".

> How do those session tests fail..?

As they have ob_start() at top, the output is discarded and only error
message is printed.

> They expect output with fatal errors? (actually those tests failed
> without your patch too, IIRC :)

They works for me without the patch.

Thanks. Dmitry.

> --Jani
> 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to