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.
This commit is contained in:
Daniel Thee Roperto 2017-01-30 13:37:19 +11:00
parent f4a2d69631
commit b40722fbf7

View File

@ -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 {