From: mudrd8mz Date: Tue, 12 May 2009 08:12:48 +0000 (+0000) Subject: Module can define its version to 0 so it is not installed. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c1fe2368b0e344ff1a8bb8e23a31c1f792a532ee;p=moodle.git Module can define its version to 0 so it is not installed. --- diff --git a/lib/upgradelib.php b/lib/upgradelib.php index 457c478a3c..60d1bb14dd 100644 --- a/lib/upgradelib.php +++ b/lib/upgradelib.php @@ -366,6 +366,11 @@ function upgrade_plugins_modules($startcallback, $endcallback) { require($fullmod .'/version.php'); // defines $module with version etc if (empty($module->version)) { + if (isset($module->version)) { + // Version is empty but is set - it means its value is 0 or ''. Let us skip such module. + // This is inteded for developers so they can work on the early stages of the module. + continue; + } throw new plugin_defective_exception($component, 'Missing version value in version.php'); }