Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.3.2

Bug #1279 Net_Cyrus::connect() returns nothing
Submitted: 2004-04-25 15:29 UTC
From: pear at oak-wood dot co dot uk Assigned: damian
Status: Closed Package: Net_Cyrus
PHP Version: 4.3.2 OS: FreeBSD 5.1
Roadmaps: (Not assigned)    
Subscription  


 [2004-04-25 15:29 UTC] pear at oak-wood dot co dot uk
Description: ------------ The method Net_Cyrus::connect() does not return anything, making it difficult to establish that a connection was successful before going on to use other methods. This patch deals with this, BUT it hits another bug in Net_IMAP::connect(), which I'll report under that module: --- Cyrus.php.orig Sat Apr 24 11:54:13 2004 +++ Cyrus.php Sun Apr 25 09:41:59 2004 @@ -89,12 +89,19 @@ $this->Net_IMAPProtocol(); // Backward compatibility hack Horde's Net_Cyrus don't allow params in connect() if( ($user === null) && ($pass === null) && ($host === null) && ($port === null) ){ - parent::connect($this->_host,$this->_port) ; - $this->login($this->_user, $this->_pass, true, false ); + if (PEAR::isError($ret = parent::connect($this->_host, $this->_port) )){ + return $ret; + } + if(PEAR::isError($ret = $this->login($this->_user, $this->_pass, true, false ))) { + return $ret; + } }else{ - parent::connect($host,$port) ; - $this->login($user, $pass, $method, false ); - + if (PEAR::isError($ret = parent::connect($host, $port) )){ + return $ret; + } + if(PEAR::isError($ret = $this->login($user, $pass, $method, false ))) { + return $ret; + } } }

Comments

 [2004-04-25 15:38 UTC] pear at oak-wood dot co dot uk
Using 0.1.0
 [2004-05-24 03:52 UTC] damian
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/packages.php Release 0.2 Fixes this