From: Greg Beaver Date: Fri, 31 Oct 2003 17:01:39 +0000 (+0000) Subject: was checking the wrong parameter for a v. - should be checking version X-Git-Tag: php-5.0.0b3RC1~815 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3102f9d6b29f7da3f266b12d2ede0b3006fbc8c;p=php was checking the wrong parameter for a v. - should be checking version --- diff --git a/pear/PEAR/Dependency.php b/pear/PEAR/Dependency.php index ed57f4e5fe..6e63319d6f 100644 --- a/pear/PEAR/Dependency.php +++ b/pear/PEAR/Dependency.php @@ -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':