Mantis - Quercus
Viewing Issue Advanced Details
4125 major always 07-15-10 10:21 02-04-11 02:11
kdecherf  
domdorn  
normal  
closed 4.0.8  
fixed  
none    
none 4.0.11  
0004125: ob_get_clean() does not exec ob_end_clean()
From PHP.net :
ob_get_clean() essentially executes both ob_get_contents() and ob_end_clean().

Whereas in OutputModule.java :
ob_get_clean() just calls ob.clean()

Possible solution :
Replace ob.clean() in OutputModule.java:172 by ob_end_clean(ob) ?
Reported with Elgg PHP Social network 1.7.1
 OutputModule.patch [^] (458 bytes) 07-25-10 13:32

Notes
(0004675)
kdecherf   
07-15-10 12:26   
I forgot to note the problem on Elgg :
An unwanted content's output appears when ob_get_clean() is used.
And this unwanted behavior is fixed when ob_get_clean is replaced by ob_get_contents(); ob_end_clean().
(0004683)
kdecherf   
07-25-10 13:32   
Fixed, replace ob.clean() by ob_end_clean(env).
Patch proposal in attachment (source based on SVN repo).
(0004786)
domdorn   
10-08-10 07:48   
could you please provide a simple testcase for that?

The code in OutputModule looks correct, but I will check again.
Also simply replacing ob.clean() with ob_end_clean() has the side effect of turning of OutputBuffering, so your patch would introduce a regression.

(0004787)
domdorn   
10-08-10 13:33   
After looking through the docs again, I actually think you where right.
Will check again tomorrow.
(0004795)
domdorn   
10-18-10 13:27   
fixed in svn rev. r7625