cvs: pear-core(PEAR_1_4) /PEAR Installer.php Registry.php
| From: | Greg Beaver | Date: | Sun, 05 Mar 2006 20:07:52 +0000 |
| Subject: | cvs: pear-core(PEAR_1_4) /PEAR Installer.php Registry.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-4602@lists.php.net to get a copy of this message | ||
cellog Sun Mar 5 20:07:52 2006 UTC
Modified files: (Branch: PEAR_1_4)
/pear-core/PEAR Installer.php Registry.php
Log:
turns out, I am instead MFH
fix 2 places that cause trouble if a channel in the registry is invalid
and 1 place that cause trouble if a channel is simply not in the registry
http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Installer.php?r1=1.228&r2=1.228.2.1&diff_format=u
Index: pear-core/PEAR/Installer.php
diff -u pear-core/PEAR/Installer.php:1.228 pear-core/PEAR/Installer.php:1.228.2.1
--- pear-core/PEAR/Installer.php:1.228 Tue Feb 21 00:59:13 2006
+++ pear-core/PEAR/Installer.php Sun Mar 5 20:07:52 2006
@@ -18,7 +18,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: Installer.php,v 1.228 2006/02/21 00:59:13 cellog Exp $
+ * @version CVS: $Id: Installer.php,v 1.228.2.1 2006/03/05 20:07:52 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -351,7 +351,7 @@
} elseif ($a['type'] == 'pear-config') {
if ($a['to'] == 'master_server') {
$chan = $this->_registry->getChannel($channel);
- if ($chan) {
+ if (!PEAR::isError($chan)) {
$to = $chan->getServer();
} else {
$to = $this->config->get($a['to'], null, $channel);
http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Registry.php?r1=1.150&r2=1.150.2.1&diff_format=u
Index: pear-core/PEAR/Registry.php
diff -u pear-core/PEAR/Registry.php:1.150 pear-core/PEAR/Registry.php:1.150.2.1
--- pear-core/PEAR/Registry.php:1.150 Sun Mar 5 04:39:40 2006
+++ pear-core/PEAR/Registry.php Sun Mar 5 20:07:52 2006
@@ -17,7 +17,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: Registry.php,v 1.150 2006/03/05 04:39:40 cellog Exp $
+ * @version CVS: $Id: Registry.php,v 1.150.2.1 2006/03/05 20:07:52 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -839,8 +839,8 @@
return false;
}
$checker = $this->_getChannel($channel->getName());
- if (PEAR::isError($channel)) {
- return $channel;
+ if (PEAR::isError($checker)) {
+ return $checker;
}
if ($channel->getAlias() != $checker->getAlias()) {
@unlink($this->_getChannelAliasFileName($checker->getAlias()));
@@ -1812,7 +1812,7 @@
}
foreach ($this->_listChannels() as $channel) {
$e = &$this->_getChannel($channel);
- if (PEAR::isError($e)) {
+ if (!$e || PEAR::isError($e)) {
continue;
}
$ret[] = $e;