MDL-24368 prevent infinite loops when caching can not be disabled

This commit is contained in:
Petr Skoda 2010-09-27 15:41:46 +00:00
parent 56048f8366
commit 9384419a4f
2 changed files with 8 additions and 2 deletions

View File

@ -77,7 +77,10 @@ if (check_browser_version('MSIE')) {
// no more headers and buffers
@ob_implicit_flush(true);
while(ob_get_level()) {
ob_end_clean();
if (!ob_end_clean()) {
// prevent infinite loop
break;
}
}
// execute the cron

View File

@ -41,7 +41,10 @@ if (version_compare(phpversion(), '5.2.0') < 0) {
// try to flush everything all the time
@ob_implicit_flush(true);
while(ob_get_level()) {
ob_end_clean(); // ob_end_flush prevents sending of headers
if (!ob_end_clean()) {
// prevent infinite loop
break;
}
}
require('../config.php');