Index: trunk/phase3/includes/resourceloader/ResourceLoader.php |
— | — | @@ -377,7 +377,11 @@ |
378 | 378 | // See also http://bugs.php.net/bug.php?id=51579 |
379 | 379 | // To work around this, we tear down all output buffering before |
380 | 380 | // sending the 304. |
381 | | - while ( ob_get_level() > 0 ) { |
| 381 | + // On some setups, ob_get_level() doesn't seem to go down to zero |
| 382 | + // no matter how often we call ob_get_clean(), so instead of doing |
| 383 | + // the more intuitive while ( ob_get_level() > 0 ) ob_get_clean(); |
| 384 | + // we have to be safe here and avoid an infinite loop. |
| 385 | + for ( $i = 0; $i < ob_get_level(); $i++ ) { |
382 | 386 | ob_end_clean(); |
383 | 387 | } |
384 | 388 | |