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

Bug #3410 Error handling in _sendCmd
Submitted: 2005-02-09 09:30 UTC
From: forjest at gmail dot com Assigned: damian
Status: Closed Package: Net_POP3
PHP Version: Irrelevant OS: OS Independ
Roadmaps: (Not assigned)    
Subscription  


 [2005-02-09 09:30 UTC] forjest at gmail dot com
Description: ------------ In some cases (undetermined) on string return $this->_raiseError($data); PHP gives a notice. Seems errorous error handling and there should be separate handling for cases when PEAR::isError($result) and when PEAR::isError($data). Course when PEAR::isError($result) is true $data not exists. Reproduce code: --------------- ///////////////////////////////// function _sendCmd($cmd) { $result = $this->_send($cmd); if (!PEAR::isError($result) AND $result) { $data = $this->_recvLn(); if (!PEAR::isError($data) AND strtoupper(substr($data, 0, 3)) == '+OK') { return $data; } } return $this->_raiseError($data); } /////////////////////////////// Expected result: ---------------- When $result is error no notice is showed. Actual result: -------------- Notice: Undefined variable: data in <path here>POP3.php on line 1086 Package version is 1.3.3. In new version that is line 1105.

Comments

 [2005-04-05 02:23 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!