MDL-26469 upgrade: cope with modules that do not set $module->cron.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 11 Jan 2012 15:42:23 +0000 (15:42 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 11 Jan 2012 15:42:23 +0000 (15:42 +0000)
lib/upgradelib.php

index bf8829f..b2db2b8 100644 (file)
@@ -465,6 +465,10 @@ function upgrade_plugins_modules($startcallback, $endcallback, $verbose) {
             }
         }
 
             }
         }
 
+        if (empty($module->cron)) {
+            $module->cron = 0;
+        }
+
         // all modules must have en lang pack
         if (!is_readable("$fullmod/lang/en/$mod.php")) {
             throw new plugin_defective_exception($component, 'Missing mandatory en language pack.');
         // all modules must have en lang pack
         if (!is_readable("$fullmod/lang/en/$mod.php")) {
             throw new plugin_defective_exception($component, 'Missing mandatory en language pack.');