From b40722fbf7950ccf87a1878d5ec0b50993cededb Mon Sep 17 00:00:00 2001 From: Daniel Thee Roperto Date: Mon, 30 Jan 2017 13:37:19 +1100 Subject: [PATCH] MDL-57809 weblib: Progress bar and output buffer - added debugging This fix makes Moodle show a debbuging message if using progressbar without defining NO_OUTPUT_BUFFERING. --- lib/outputcomponents.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index 3ec3b99642f..a1be437ba48 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -4747,6 +4747,10 @@ class progress_bar implements renderable, templatable { * @param bool $autostart Whether to start the progress bar right away. */ public function __construct($htmlid = '', $width = 500, $autostart = false) { + if (!defined('NO_OUTPUT_BUFFERING') || !NO_OUTPUT_BUFFERING) { + debugging('progress_bar used without setting NO_OUTPUT_BUFFERING.', DEBUG_DEVELOPER); + } + if (!empty($htmlid)) { $this->html_id = $htmlid; } else {