cvs: pear-core /PEAR/Command Package.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Fri, 28 Mar 2008 22:53:31 +0000 |
| Subject: | cvs: pear-core /PEAR/Command Package.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-7414@lists.php.net to get a copy of this message | ||
dufuz Fri Mar 28 22:53:31 2008 UTC
Modified files:
/pear-core/PEAR/Command Package.php
Log:
Bug #13525 pear package-validate is not showing warnings even if there are
http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Command/Package.php?r1=1.126&r2=1.127&diff_format=u
Index: pear-core/PEAR/Command/Package.php
diff -u pear-core/PEAR/Command/Package.php:1.126 pear-core/PEAR/Command/Package.php:1.127
--- pear-core/PEAR/Command/Package.php:1.126 Tue Jan 29 03:21:01 2008
+++ pear-core/PEAR/Command/Package.php Fri Mar 28 22:53:31 2008
@@ -18,7 +18,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Package.php,v 1.126 2008/01/29 03:21:01 cellog Exp $
+ * @version CVS: $Id: Package.php,v 1.127 2008/03/28 22:53:31 dufuz Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -374,15 +374,12 @@
} else {
$valid = $info->validate(PEAR_VALIDATE_PACKAGING);
}
- $err = array();
- $warn = array();
- if (!$valid) {
- foreach ($info->getValidationWarnings() as $error) {
- if ($error['level'] == 'warning') {
- $warn[] = $error['message'];
- } else {
- $err[] = $error['message'];
- }
+ $err = $warn = array();
+ foreach ($info->getValidationWarnings() as $error) {
+ if (!$valid) {
+ $err[] = $error['message'];
+ } else {
+ $warn[] = $error['message'];
}
}
$this->_displayValidationResults($err, $warn);
@@ -751,7 +748,7 @@
$a = &new PEAR_Installer($ui);
return $a;
}
-
+
/**
* For unit testing purposes
*/
@@ -763,7 +760,7 @@
include_once 'PEAR/Command/Packaging.php';
}
}
-
+
if (class_exists('PEAR_Command_Packaging')) {
$a = &new PEAR_Command_Packaging($ui, $config);
} else {