#33039 [NEW]: on shutdown: Notice: Unknown: Mailbox is empty (errflg=1) in Unknown on line 0

From: Date: Mon, 16 May 2005 06:35:20 +0000
Subject: #33039 [NEW]: on shutdown: Notice: Unknown: Mailbox is empty (errflg=1) in Unknown on line 0
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79031@lists.php.net to get a copy of this message
From: mpb dot mail at gmail dot com Operating system: Gentoo Linux PHP version: 5.0.3 PHP Bug Type: IMAP related Bug description: on shutdown: Notice: Unknown: Mailbox is empty (errflg=1) in Unknown on line 0 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 bug report at http://bugs.php.net/?id=33039&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33039&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33039&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33039&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33039&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33039&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33039&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33039&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33039&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33039&r=support Expected behavior: http://bugs.php.net/fix.php?id=33039&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33039&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33039&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33039&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33039&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33039&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33039&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33039&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33039&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33039&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33039&r=mysqlcfg

« previous php.bugs (#79031) next »