cvs: pear-core /PEAR/Command Package.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Sat, 29 Mar 2008 21:06:58 +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-7418@lists.php.net to get a copy of this message | ||
dufuz Sat Mar 29 21:06:58 2008 UTC
Modified files:
/pear-core/PEAR/Command Package.php
Log:
Master Greg wants more if()'s and the old foreach
Partial revert
http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Command/Package.php?r1=1.127&r2=1.128&diff_format=u
Index: pear-core/PEAR/Command/Package.php
diff -u pear-core/PEAR/Command/Package.php:1.127 pear-core/PEAR/Command/Package.php:1.128
--- pear-core/PEAR/Command/Package.php:1.127 Fri Mar 28 22:53:31 2008
+++ pear-core/PEAR/Command/Package.php Sat Mar 29 21:06:58 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.127 2008/03/28 22:53:31 dufuz Exp $
+ * @version CVS: $Id: Package.php,v 1.128 2008/03/29 21:06:58 dufuz Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -375,11 +375,13 @@
$valid = $info->validate(PEAR_VALIDATE_PACKAGING);
}
$err = $warn = array();
- foreach ($info->getValidationWarnings() as $error) {
- if (!$valid) {
- $err[] = $error['message'];
- } else {
- $warn[] = $error['message'];
+ if ($errors = $info->getValidationWarnings()) {
+ foreach ($errors as $error) {
+ if ($error['level'] == 'warning') {
+ $warn[] = $error['message'];
+ } else {
+ $err[] = $error['message'];
+ }
}
}
$this->_displayValidationResults($err, $warn);