Skip to content

Commit 593fa7b

Browse files
committed
MDL-70854 core: Fix error with stored progress bars in cron web ui.
1 parent 725a3f9 commit 593fa7b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/classes/stored_progress_bar.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ protected function _update($percent, $msg): void {
279279
protected function render_update(): void {
280280
global $OUTPUT;
281281

282+
// If no output buffering, don't render it at all.
283+
if (defined('NO_OUTPUT_BUFFERING') && NO_OUTPUT_BUFFERING) {
284+
$this->auto_update(false);
285+
}
286+
287+
// If we want the screen to auto update, render it.
282288
if ($this->autoupdate) {
283289
echo $OUTPUT->render_progress_bar_update(
284290
$this->idnumber, sprintf("%.1f", $this->percent), $this->message, $this->get_estimate_message($this->percent)

0 commit comments

Comments
 (0)