]> granicus.if.org Git - php/commitdiff
rework some odd code
authorGreg Beaver <cellog@php.net>
Sat, 1 Nov 2003 05:16:04 +0000 (05:16 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 1 Nov 2003 05:16:04 +0000 (05:16 +0000)
pear/PEAR/Dependency.php

index 5c4dcce963b02216ed13c41abd87c6b2284567a8..198422fd5f37a162ef9c5f9c404c3e52bf1efe0d 100644 (file)
@@ -314,11 +314,15 @@ class PEAR_Dependency
      */
     function checkPHP(&$errmsg, $req, $relation = 'ge')
     {
+        // this would be a bit stupid, but oh well :)
+        if ($relation == 'has') {
+            return false;
+        }
         if (substr($req, 0, 2) == 'v.') {
             $req = substr($req,2, strlen($req) - 2);
         }
         $php_ver = phpversion();
-        $operator = substr($relation,0,2);
+        $operator = $relation;
         if (!version_compare("$php_ver", "$req", $operator)) {
             $errmsg = "PHP version " . $this->signOperator($operator) .
                 " $req is required";