mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-24368 prevent infinite loops when caching can not be disabled
This commit is contained in:
parent
56048f8366
commit
9384419a4f
@ -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
|
||||
|
@ -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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user