Browse Source

Bug fix: protect the setup from a fatal exception when encountering a module with no version number.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4847 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 7 năm trước cách đây
mục cha
commit
d07f571440
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      setup/extensionsmap.class.inc.php

+ 5 - 0
setup/extensionsmap.class.inc.php

@@ -252,6 +252,11 @@ class iTopExtensionsMap
 						// to this extension
 						$sModuleId = $aModuleInfo[1];
 						list($sModuleName, $sModuleVersion) = ModuleDiscovery::GetModuleName($sModuleId);
+						if ($sModuleVersion == '')
+						{
+							// Provide a default module version since version is mandatory when recording ExtensionInstallation
+							$sModuleVersion = '0.0.1';
+						}
 						
 						if ($sParentExtensionId !== null)
 						{