PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_Cyrus » Bug #1279

Net_Cyrus::connect() returns nothing

Details

Submitted2004-04-25 15:29 UTC
Frompear at oak-wood dot co dot uk
Assigneddamian
StatusClosed
PackageNet_Cyrus
PHP Version4.3.2
OSFreeBSD 5.1
Roadmaps(Not assigned)

Comments

[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;
+ }
}
}

[2004-04-25 15:38 UTC] pear at oak-wood dot co dot uk

Using 0.1.0