From b5afdff0ede065ac7f2b901ea402bb64b1566b2d Mon Sep 17 00:00:00 2001 From: pallo Date: Fri, 29 Sep 2000 09:55:54 +0000 Subject: [PATCH] Fixed bug in PHP version checking code. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@767 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/strings.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/functions/strings.php b/functions/strings.php index fd742935..288f1e13 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -304,10 +304,15 @@ if($vrel[0] == "r" || $vrel[0] == "R") $vrel = - strval(substr($vrel, 2))/10; - // Compare major and minor + // Compare major version if($vmajor < $major) return false; + if($vmajor > $major) return true; + + // Major is the same. Compare minor if($vminor < $minor) return false; + if($vminor > $minor) return true; + // Major and minor is the same as the required one. // Compare release if($vrel >= 0 && $release >= 0) { // Neither are beta if($vrel < $release) return false; -- 2.25.1