From: Greg Beaver Date: Sat, 12 Jun 2004 06:16:17 +0000 (+0000) Subject: MFH bugfixes X-Git-Tag: php-4.3.9RC1~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67d56970b9219b800ce05c45c7b8361c45744992;p=php MFH bugfixes --- diff --git a/pear/PEAR/Common.php b/pear/PEAR/Common.php index 6e11a0d027..2f9c611823 100644 --- a/pear/PEAR/Common.php +++ b/pear/PEAR/Common.php @@ -1076,7 +1076,7 @@ class PEAR_Common extends PEAR if (!isset($info['version'])) { $errors[] = 'missing version'; } elseif (!$this->validPackageVersion($info['version'])) { - $errors[] = 'invalid package version'; + $errors[] = 'invalid package release version'; } if (empty($info['release_state'])) { $errors[] = 'missing release state'; @@ -1115,24 +1115,24 @@ class PEAR_Common extends PEAR $i++; } } - if (!empty($info['deps'])) { + if (!empty($info['release_deps'])) { $i = 1; - foreach ($info['deps'] as $d) { + foreach ($info['release_deps'] as $d) { if (empty($d['type'])) { $errors[] = "dependency $i: missing type"; } elseif (!in_array($d['type'], PEAR_Common::getDependencyTypes())) { - $errors[] = "dependency $i: invalid type, should be one of: " . + $errors[] = "dependency $i: invalid type '$d[type]', should be one of: " . implode(' ', PEAR_Common::getDependencyTypes()); } if (empty($d['rel'])) { $errors[] = "dependency $i: missing relation"; } elseif (!in_array($d['rel'], PEAR_Common::getDependencyRelations())) { - $errors[] = "dependency $i: invalid relation, should be one of: " + $errors[] = "dependency $i: invalid relation '$d[rel]', should be one of: " . implode(' ', PEAR_Common::getDependencyRelations()); } if (!empty($d['optional'])) { if (!in_array($d['optional'], array('yes', 'no'))) { - $errors[] = "dependency $i: invalid relation optional attribute, should be one of: yes no"; + $errors[] = "dependency $i: invalid relation optional attribute '$d[optional]', should be one of: yes no"; } } if ($d['rel'] != 'has' && empty($d['version'])) { @@ -1407,7 +1407,7 @@ class PEAR_Common extends PEAR } continue 2; case T_DOUBLE_COLON: - if ($tokens[$i - 1][0] != T_STRING) { + if (!($tokens[$i - 1][0] == T_WHITESPACE || $tokens[$i - 1][0] == T_STRING)) { PEAR::raiseError("Parser error: Invalid PHP file $file", PEAR_COMMON_ERROR_INVALIDPHP); return false;