Commit d0a4abf7 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #419 in ZP/z-push from...

Merge pull request #419 in ZP/z-push from bugfix/ZP-1096-checkmapiextversion-throws-warnings to develop

* commit '1c91cd2e':
  ZP-1096 Check for mapi externsion first and fail early.
parents d130e572 1c91cd2e
......@@ -201,19 +201,17 @@ class Utils {
* @return boolean installed version is superior to the checked string
*/
static public function CheckMapiExtVersion($version = "") {
if (!extension_loaded("mapi")) {
return false;
}
// compare build number if requested
if (preg_match('/^\d+$/', $version) && strlen($version) > 3) {
$vs = preg_split('/-/', phpversion("mapi"));
return ($version <= $vs[1]);
}
if (extension_loaded("mapi")){
if (version_compare(phpversion("mapi"), $version) == -1){
return false;
}
}
else
return false;
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment