]> granicus.if.org Git - php/commitdiff
was checking the wrong parameter for a v. - should be checking version
authorGreg Beaver <cellog@php.net>
Fri, 31 Oct 2003 17:01:39 +0000 (17:01 +0000)
committerGreg Beaver <cellog@php.net>
Fri, 31 Oct 2003 17:01:39 +0000 (17:01 +0000)
pear/PEAR/Dependency.php

index ed57f4e5fe9fcf5d60528297821057904b584b57..6e63319d6f8292ad33b31d7b61bde25b7f9aeb30 100644 (file)
@@ -126,8 +126,8 @@ class PEAR_Dependency
     function checkPackage(&$errmsg, $name, $req = null, $relation = 'has',
                           $opt = false)
     {
-        if (substr($relation, 0, 2) == 'v.') {
-            $relation = substr($relation, 2);
+        if (is_string($req) && substr($req, 0, 2) == 'v.') {
+            $req = substr($req, 2);
         }
         switch ($relation) {
             case 'has':