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] 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/get/Net_POP3