Commit 1c91cd2e authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1096 Check for mapi externsion first and fail early.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 94bc7a79
......@@ -219,19 +219,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