cvs: php-src(PHP_4_3) /pear/PEAR Common.php

From: Date: Sat, 12 Jun 2004 06:16:17 +0000
Subject: cvs: php-src(PHP_4_3) /pear/PEAR Common.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-388@lists.php.net to get a copy of this message
cellog Sat Jun 12 02:16:17 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/pear/PEAR Common.php Log: MFH bugfixes http://cvs.php.net/diff.php/php-src/pear/PEAR/Common.php?r1=1.81.2.17&r2=1.81.2.18&ty=u Index: php-src/pear/PEAR/Common.php diff -u php-src/pear/PEAR/Common.php:1.81.2.17 php-src/pear/PEAR/Common.php:1.81.2.18 --- php-src/pear/PEAR/Common.php:1.81.2.17 Thu Apr 29 22:05:46 2004 +++ php-src/pear/PEAR/Common.php Sat Jun 12 02:16:17 2004 @@ -17,7 +17,7 @@ // | Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.81.2.17 2004/04/30 02:05:46 cellog Exp $ +// $Id: Common.php,v 1.81.2.18 2004/06/12 06:16:17 cellog Exp $ require_once 'PEAR.php'; require_once 'Archive/Tar.php'; @@ -1076,7 +1076,7 @@ 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 @@ $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 @@ } 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;

« previous php.pear.core (#388) next »