cellog Sat Nov 5 13:24:20 2005 EDT
Modified files: (Branch: PHP_4_4)
/php-src/pear/PEAR Installer.php
Log:
fix error on call to getValidationWarnings() on wrong variable
http://cvs.php.net/diff.php/php-src/pear/PEAR/Installer.php?r1=1.81.2.27.2.1&r2=1.81.2.27.2.2&ty=u
Index: php-src/pear/PEAR/Installer.php
diff -u php-src/pear/PEAR/Installer.php:1.81.2.27.2.1
php-src/pear/PEAR/Installer.php:1.81.2.27.2.2
--- php-src/pear/PEAR/Installer.php:1.81.2.27.2.1 Wed Nov 2 11:57:20 2005
+++ php-src/pear/PEAR/Installer.php Sat Nov 5 13:24:20 2005
@@ -18,7 +18,7 @@
* @author Greg Beaver <[EMAIL PROTECTED]>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Installer.php,v 1.81.2.27.2.1 2005/11/02 16:57:20
cellog Exp $
+ * @version CVS: $Id: Installer.php,v 1.81.2.27.2.2 2005/11/05 18:24:20
cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -885,10 +885,12 @@
$p = &$pkg->fromAnyFile($descfile, PEAR_VALIDATE_INSTALLING);
PEAR::staticPopErrorHandling();
if (PEAR::isError($p)) {
- foreach ($pkg->getValidationWarnings(true) as $err) {
- $loglevel = $err['level'] == 'error' ? 0 : 1;
- if (!isset($this->_options['soft'])) {
- $this->log($loglevel, ucfirst($err['level']) . ': ' .
$err['message']);
+ if (is_array($p->getUserInfo())) {
+ foreach ($p->getUserInfo() as $err) {
+ $loglevel = $err['level'] == 'error' ? 0 : 1;
+ if (!isset($this->_options['soft'])) {
+ $this->log($loglevel, ucfirst($err['level']) . ': ' .
$err['message']);
+ }
}
}
return $this->raiseError('Installation failed: invalid package
file');
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php