-
Bug
-
Resolution: Fixed
-
Minor
-
3.1.1
-
MOODLE_31_STABLE
-
MOODLE_31_STABLE
-
MDL-55385_master -
MDL-49324 updated the core\progress\display::update_progress() function to fill the output buffer using str_pad(), using the output buffer size defined in php.ini as the second argument to str_pad().
However, the second argument of str_pad() must be and int, while valid values for output_buffering in php.ini include 'On' and 'Off'. If you use one of these values, you get the following warning when a progress bar is used:
Warning: str_pad() expects parameter 2 to be long, string given in /path/to/moodle/lib/classes/progress/display.php on line 132
Steps to reproduce:
- Set output_buffering to 'Off' in php.ini
- Do something that displays a progress base (e.g. making a course backup)
- The above Warning will be displayed when the progress bar updates.