cvs: pear-core /PEAR/Command Config.php /PEAR/Frontend CLI.php
| From: | Pierre-Alain Joye | Date: | Thu, 02 Mar 2006 13:16:19 +0000 |
| Subject: | cvs: pear-core /PEAR/Command Config.php /PEAR/Frontend CLI.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-4585@lists.php.net to get a copy of this message | ||
pajoye Thu Mar 2 13:16:19 2006 UTC
Modified files:
/pear-core/PEAR/Command Config.php
/pear-core/PEAR/Frontend CLI.php
Log:
- remove notices, no performance impact to actually clean args
http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Command/Config.php?r1=1.49&r2=1.50&diff_format=u
Index: pear-core/PEAR/Command/Config.php
diff -u pear-core/PEAR/Command/Config.php:1.49 pear-core/PEAR/Command/Config.php:1.50
--- pear-core/PEAR/Command/Config.php:1.49 Fri Jan 6 04:47:36 2006
+++ pear-core/PEAR/Command/Config.php Thu Mar 2 13:16:19 2006
@@ -16,7 +16,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Config.php,v 1.49 2006/01/06 04:47:36 cellog Exp $
+ * @version CVS: $Id: Config.php,v 1.50 2006/03/02 13:16:19 pajoye Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -155,8 +155,14 @@
function doConfigShow($command, $options, $params)
{
+ if (is_array($params)) {
+ $layer = isset($params[0]) ? $params[0] : NULL;
+ } else {
+ $layer = NULL;
+ }
+
// $params[0] -> the layer
- if ($error = $this->_checkLayer(@$params[0])) {
+ if ($error = $this->_checkLayer($layer)) {
return $this->raiseError("config-show:$error");
}
$keys = $this->config->getKeys();
@@ -170,7 +176,7 @@
$data = array('caption' => 'Configuration (channel ' . $channel .
'):');
foreach ($keys as $key) {
$type = $this->config->getType($key);
- $value = $this->config->get($key, @$params[0], $channel);
+ $value = $this->config->get($key, $layer, $channel);
if ($type == 'password' && $value) {
$value = '********';
}
http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Frontend/CLI.php?r1=1.58&r2=1.59&diff_format=u
Index: pear-core/PEAR/Frontend/CLI.php
diff -u pear-core/PEAR/Frontend/CLI.php:1.58 pear-core/PEAR/Frontend/CLI.php:1.59
--- pear-core/PEAR/Frontend/CLI.php:1.58 Thu Mar 2 02:44:41 2006
+++ pear-core/PEAR/Frontend/CLI.php Thu Mar 2 13:16:19 2006
@@ -16,7 +16,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: CLI.php,v 1.58 2006/03/02 02:44:41 pajoye Exp $
+ * @version CVS: $Id: CLI.php,v 1.59 2006/03/02 13:16:19 pajoye Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -465,7 +465,7 @@
}
$tmp = count_chars($columns[$i], 1);
// handle unix, mac and windows formats
- $lines = (isset($tmp[10]) ? $tmp[10] : isset($tmp[13]) ? $tmp[13] : 0) + 1;
+ $lines = (isset($tmp[10]) ? $tmp[10] : (isset($tmp[13]) ? $tmp[13] : 0)) + 1;
if ($lines > $highest) {
$highest = $lines;
}