https://bugzilla.wikimedia.org/show_bug.cgi?id=46836

--- Comment #9 from Krinkle <krinklem...@gmail.com> ---
(In reply to comment #7)
> Change 74570 had a related patch set uploaded by Hoo man:
> Suppress notices while deleting output buffers
> 
> https://gerrit.wikimedia.org/r/74570

Can you explain why caching the level is not a problem now? Aside from the
warning suppression, this is exactly what I did a few months ago (back then
just to optimise the code, not to fix anything in particular) and then I had to
revert it as it caused this bug (bug 46836) and added an inline code comment
about it, which you now removed.

In some (or many?) cases the level seems to go to zero in 1 call. So caching
doesn't seem like a good choice.

(In reply to comment #5)
> This change means I'm now seeing the 20-byte empty gzip bodies with 304
> responses that this code is supposed to prevent.
> 
> I don't understand how it was supposed to work for ob_get_level() not equal
> to
> 0 or 1.
> 
> Consider the case where ob_get_level() starts at 2: ob_end_clean() will only
> be
> called once.
> 
> for ( $i = 0; $i < ob_get_level(); $i++ ) {
>     ob_end_clean();
> }
> 
> $i = 0;
> 
> $i < ob_get_level();      [0 < 2: true]
> ob_end_clean(); 
> $i++                      [$i = 1]
> 
> 
> $i < ob_get_level();      [1 < 1: false]



So it should just be <= instead of <, right?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to