Edit report at https://pear.php.net/bugs/bug.php?id=16288&edit=1

ID: 16288
Updated by: daniel.oconnor@gmail.com
Reported By: joerg dot eichhorn at sys-mail dot net
Summary: getMessagesList breaks if mailbox is empty
-Status: Open
+Status: Closed
Type: Bug
Package: Net_IMAP
Package Version: 1.1.0
PHP Version: Irrelevant
-Assigned To:
+Assigned To: doconnor
Roadmap Versions:
New Comment:

-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.

Previous Comments:

[2009-06-04 19:34:53] jeichhor

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
if (empty($ret['PARSED'])) {
return array();

Expected result:
getMessagesList() should return an empty array


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedJan 2, '12 at 1:33a
activeJan 2, '12 at 1:33a

1 user in discussion

Daniel Oconnor: 1 post



site design / logo © 2021 Grokbase