Bug #3311 [Com]: incorrect return values

From: Date: Thu, 25 Aug 2005 13:41:21 +0000
Subject: Bug #3311 [Com]: incorrect return values
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-6702@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=3311&edit=1 ID: 3311 Comment by: matakagi at osk2 dot 3web dot ne dot jp Reported By: rkwtavdw at puk dot ac dot za Status: Feedback Id: 3311 Type: Bug Package: Documentation Operating System: Linux PHP Version: 4.3.10 New Comment: Hi, I reproduced the bug. try it. Actually, the sourcecode of Net_POP3::login() returns PEAR_Error (See: line 256 and line 264 of POP3.php). <?php require_once("Net/POP3.php"); $pop3 = new Net_POP3; $res = $pop3->connect('your.pop3.server'); $res = $pop3->login('your_account', 'wrong_password'); if (PEAR::isError($res)) { echo 'Net_POP3::login() returned PEAR_Error!'; } else { echo 'This Bug report is BOGUS!'; } ?> Previous Comments: ------------------------------------------------------------------------ [2005-02-24 11:44:16] mj at php dot net According to the sourcecode of Net_POP3::login() only boolean values are returned. Can you provide us example code with which you can reproduce the bug? ------------------------------------------------------------------------ [2005-01-27 07:56:22] rkwtavdw at puk dot ac dot za Description: ------------ The Net_POP3::login($username,$password) method API claims that it returns a boolean (stating whether the login was succesful or not), but I found it returned an Object on failure. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=3311&edit=1

« previous php.pear.doc (#6702) next »