ID: 33039 Updated by: [EMAIL PROTECTED] Reported By: mpb dot mail at gmail dot com -Status: Open +Status: Verified Bug Type: IMAP related Operating System: * -PHP Version: 5.*, 4.* +PHP Version: 4.*, 5.*
Previous Comments: ------------------------------------------------------------------------ [2005-05-17 02:10:28] mpb dot mail at gmail dot com I downloaded: http://snaps.php.net/php5-STABLE-latest.tar.gz which was: php5-STABLE-200505161832 -------- $ ./configure --with-imap --with-imap-ssl --disable-cgi $ make $ cd sapi/cli $ ./php ~/test.php Notice: Unknown: Mailbox is empty (errflg=1) in Unknown on line 0 -------- So... the problem is still there. $ cat ~/test.php <?php ini_set ('error_reporting', E_ALL); imap_open ( '{pop.XXXXXXX.com:110/pop/novalidate-cert}INBOX', 'USERXXXXX', 'PASSXXXX' ); ?> Please let me know if you would like me to create an empty POP mailbox for you to test against. Thanks! ------------------------------------------------------------------------ [2005-05-16 09:58:31] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip ------------------------------------------------------------------------ [2005-05-16 08:35:15] mpb dot mail at gmail dot com Description: ------------ If you imap_open an empty pop mailbox, a "Mailbox is empty (errflg=1)" notice will be printed during PHP's "shutdown" or "cleanup" phase after your script has finished running (assuming E_NOTICE is set, of course). As there is nothing wrong with having an empty mailbox, I believe that PHP should not print this notice. I suspect that PHP is misinterpreting a return code from the IMAP library, or is making an unnecessary call to the IMAP library. It is also possible that the IMAP library is buggy and should not be returning an errflg=1 (whatever that means). If, in the reproduce code, you uncomment the final ini_set then the notice will not be printed (as E_NOTICE is no longer set during PHP's shutdown). If you are unable to reproduce this problem with the empty POP mailbox of your choice, let me know and I will set up a POP mailbox for you to test against. See also bug 7207. Reproduce code: --------------- ini_set ('error_reporting', E_ALL); $imap = imap_open ( '{host.com:110/pop/novalidate-cert}INBOX', 'user', 'password' ); trigger_error ('test notice'); sleep (5); // ini_set ('error_reporting', E_ALL ^ E_NOTICE); Expected result: ---------------- Notice: test notice in /root/pinstall/local/vl0/test.php on line 8 Actual result: -------------- Notice: test notice in /root/pinstall/local/vl0/test.php on line 8 Notice: Unknown: Mailbox is empty (errflg=1) in Unknown on line 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33039&edit=1