MDL-27878 make progress bars fail explicity if you forget to call create().

This commit is contained in:
Tim Hunt
2011-06-16 18:55:29 +01:00
parent c3f85e22d9
commit 6481b28fe5
+3 -2
View File
@@ -3060,8 +3060,9 @@ EOT;
* @return void Echo's output
*/
private function _update($percent, $msg) {
if (empty($this->time_start)){
$this->time_start = microtime(true);
if (empty($this->time_start)) {
throw new coding_exception('You must call create() (or use the $autostart ' .
'argument to the constructor) before you try updating the progress bar.');
}
if (CLI_SCRIPT) {