Edit report at https://bugs.php.net/bug.php?id=61272&edit=1

 ID:                 61272
 Updated by:         m...@php.net
 Reported by:        peacech at gmail dot com
 Summary:            ob_start callback get passed empty string
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            Output Control
 Operating System:   Arch 32 bit
 PHP Version:        5.4.0
 Assigned To:        mike
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of mike
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=575790e8427ea09cb76aed16ff776461367f2a3b
Log: fix bug #61272 ob_start callback get passed empty string


Previous Comments:
------------------------------------------------------------------------
[2012-11-23 07:40:29] tdroenner at gmail dot com

When is a official fix for this available?

------------------------------------------------------------------------
[2012-08-23 08:42:34] a dot vi at laposte dot net

Hi again,

I have used casper's patch. Compilation worked fine and it's all cool now. 
Thanks Casper

Regards

------------------------------------------------------------------------
[2012-08-21 11:17:32] a dot vi at laposte dot net

Same problem here with PHP5.4.6. I've had to patch my application and use:
ob_end_flush();
ob_clean();
instead of:
ob_end_clean();

I really agree with Casper: if this is not a change of behavior, this is a bug. 
My application was working really fine with PHP5.3.8 but was broken with 
PHP5.4.6. So something has changed 

Kind regards

------------------------------------------------------------------------
[2012-07-10 08:59:04] dragon829 at gmail dot com

We have the same problem in 5.4.4,and it hasn't reproduced in 5.3.14 .

------------------------------------------------------------------------
[2012-06-08 08:03:50] casper at langemeijer dot eu

Mike, I've dug a bit deeper into this problem, and must conclude that this 
really is a bug, or at least a change of behaviour.

I think test tests/output/ob_017.phpt is faulty too. I corrected bot output.c 
and the test in the patch I supplied.

In PHP 5.3 the callback function is called with the contents of the output 
buffer when ob_clean or ob_end_clean is called. The output will be fed to the 
callback function, but is erased right after that call.

After your output buffering rewrite the output buffer is cleaned before the 
callback is called.

I see no valid reason for a functional change. You're supplying the callback 
with a flag so that if needed the callback function could do this itself if 
needed.

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=61272


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

Reply via email to