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

Bug #16288 getMessagesList breaks if mailbox is empty
Submitted: 2009-06-04 23:34 UTC
From: jeichhor Assigned: doconnor
Status: Closed Package: Net_IMAP (version 1.1.0)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 19 - 12 = ?

 
 [2009-06-04 23:34 UTC] jeichhor (Jörg Eichhorn)
Description: ------------ when calling getMessagesList() on an empty mailbox - use expunge() to force - it will break PHP Warning: Invalid argument supplied for foreach() in /pear/Net/IMAP.php on line 400 also return value will be undefined/null so far the following fix helped me: $ diff IMAP.php~1~ IMAP.php 399a400,404 > > if (empty($ret['PARSED'])) { > return array(); > } > Expected result: ---------------- getMessagesList() should return an empty array

Comments

 [2012-01-02 07:34 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Closed -Assigned To: +Assigned To: doconnor
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.