Bug #3333 Updated: PHP crashes wen I open an empty mailbox
| From: | Bug Database | Date: | Tue, 29 Feb 2000 14:57:23 +0000 |
| Subject: | Bug #3333 Updated: PHP crashes wen I open an empty mailbox | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16138@lists.php.net to get a copy of this message | ||
ID: 3333
Updated by: hholzgra
Reported By: sutter@mygale.org
Status: Feedback
Bug Type: IMAP related
Assigned To:
Comments:
the POP3 and IMAP drivers in c-client treat
an empty mailbox slightly different here
both will log this event with mm_log,
but while the imap driver logs it just for info
with type NIL, the pop driver issues a WARN
this leads to a 'fatal error' message in PHP,
but it should not crash
you may want to check the presence of messages
with imap_check() or imap_status() before
calling imap_headers()
PS: you have an off-by-one error in your example,
it should read <= count() instead of < count()
in the for-statement
Full Bug description available at: http://bugs.php.net/?id=3333