Attempt at fixing bug 26370, which seems to be an infinite loop caused by ob_get_level() never going all the way down to 0 no matter how many output buffers we destroy. Use a for loop instead
This commit is contained in:
parent
9e9441f287
commit
8edf949acd
1 changed files with 5 additions and 1 deletions
|
|
@ -377,7 +377,11 @@ class ResourceLoader {
|
|||
// See also http://bugs.php.net/bug.php?id=51579
|
||||
// To work around this, we tear down all output buffering before
|
||||
// sending the 304.
|
||||
while ( ob_get_level() > 0 ) {
|
||||
// On some setups, ob_get_level() doesn't seem to go down to zero
|
||||
// no matter how often we call ob_get_clean(), so instead of doing
|
||||
// the more intuitive while ( ob_get_level() > 0 ) ob_get_clean();
|
||||
// we have to be safe here and avoid an infinite loop.
|
||||
for ( $i = 0; $i < ob_get_level(); $i++ ) {
|
||||
ob_end_clean();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue