Allow version numbers to omit trailing zeros
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 19 Feb 2009 22:24:48 +0000 (22:24 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 19 Feb 2009 22:24:48 +0000 (22:24 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13404 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/plugin.php

index 337ca73..d3a13f9 100644 (file)
@@ -1003,8 +1003,10 @@ function check_plugin_dependencies($plugin_name, $force_inclusion = FALSE)
       //
       $version = explode('.', $depend_requirements['version'], 3);
       $version[0] = intval($version[0]);
-      $version[1] = intval($version[1]);
-      $version[2] = intval($version[2]);
+      if (isset($version[1])) $version[1] = intval($version[1]);
+      else $version[1] = 0;
+      if (isset($version[2])) $version[2] = intval($version[2]);
+      else $version[2] = 0;
 
       $force_dependency_inclusion = !$depend_requirements['activate'];