diff options
author | Stig Bakken <ssb@php.net> | 2002-06-02 09:59:21 +0000 |
---|---|---|
committer | Stig Bakken <ssb@php.net> | 2002-06-02 09:59:21 +0000 |
commit | 5051496b91c32538512737afb38637bb2ec037ef (patch) | |
tree | 208533dd7cd63756d8f6a1ad5b70caadc2f24e04 | |
parent | 329ac190226396647e5a0ba4a6f56ed3e6719e20 (diff) | |
download | php-git-5051496b91c32538512737afb38637bb2ec037ef.tar.gz |
* fix some error reporting
-rw-r--r-- | pear/PEAR/Command/Config.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/pear/PEAR/Command/Config.php b/pear/PEAR/Command/Config.php index b64f0a2523..0fe768fc7c 100644 --- a/pear/PEAR/Command/Config.php +++ b/pear/PEAR/Command/Config.php @@ -83,8 +83,7 @@ in. The default layer is "user". { // $params[0] -> the layer if ($error = $this->_checkLayer(@$params[0])) { - $failmsg .= $error; - break; + return $this->raiseError($error); } $keys = $this->config->getKeys(); sort($keys); @@ -111,11 +110,10 @@ in. The default layer is "user". // $params[0] -> the parameter // $params[1] -> the layer if ($error = $this->_checkLayer(@$params[1])) { - $failmsg .= $error; - break; + return $this->raiseError($error); } if (sizeof($params) < 1 || sizeof($params) > 2) { - $failmsg .= "config-get expects 1 or 2 parameters"; + return $this->raiseError("config-get expects 1 or 2 parameters"); } elseif (sizeof($params) == 1) { $this->ui->outputData("$params[0] = " . $this->config->get($params[0]), $command); } else { |