logo       
Google Custom Search
    AddThis Social Bookmark Button

cvs: pear-core /PEAR Installer.php Registry.php: msg#00021

Subject: cvs: pear-core /PEAR Installer.php Registry.php
cellog          Sun Mar  5 20:03:01 2006 UTC

  Modified files:              
    /pear-core/PEAR     Installer.php Registry.php 
  Log:
  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.229&diff_format=u
Index: pear-core/PEAR/Installer.php
diff -u pear-core/PEAR/Installer.php:1.228 pear-core/PEAR/Installer.php:1.229
--- pear-core/PEAR/Installer.php:1.228  Tue Feb 21 00:59:13 2006
+++ pear-core/PEAR/Installer.php        Sun Mar  5 20:03:01 2006
@@ -18,7 +18,7 @@
  * @author     Greg Beaver <cellog@xxxxxxx>
  * @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.229 2006/03/05 20:03:01 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.151&diff_format=u
Index: pear-core/PEAR/Registry.php
diff -u pear-core/PEAR/Registry.php:1.150 pear-core/PEAR/Registry.php:1.151
--- pear-core/PEAR/Registry.php:1.150   Sun Mar  5 04:39:40 2006
+++ pear-core/PEAR/Registry.php Sun Mar  5 20:03:01 2006
@@ -17,7 +17,7 @@
  * @author     Greg Beaver <cellog@xxxxxxx>
  * @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.151 2006/03/05 20:03:01 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;




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>