Bug #16004 Updated: @imap_msgno() and @imap_header() display warnings
| From: | sniper@php.net | Date: | Wed, 26 Jun 2002 23:36:57 +0000 |
| Subject: | Bug #16004 Updated: @imap_msgno() and @imap_header() display warnings | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12180@lists.php.net to get a copy of this message | ||
ID: 16004
Updated by: sniper@php.net
Reported By: dshadow@zort.net
-Status: Open
+Status: Closed
Bug Type: IMAP related
Operating System: Linux
PHP Version: 4.1.2
New Comment:
This should be fixed in PHP 4.2.1 and properly fixed in PHP 4.2.2-dev
found here:
http://snaps.php.net/php4-STABLE-latest.tar.gz
Previous Comments:
------------------------------------------------------------------------
[2002-03-28 10:20:38] mfischer@php.net
Sorry for the E_NONE ;-)
Chances are that the error goes to output only on script shutdown ...
hmm ...
Will not set this to feedback this time as this should be investiged (I
will if I find the time). Remind me that we've similar bug reports for
this behaviour.
------------------------------------------------------------------------
[2002-03-28 10:05:02] dshadow@zort.net
Actually, it's slightly more complex than I thought:
if I bracket the line giving the errors with
$__old_err = error_reporting(0);
...
error_reporting($__old_err);
I still get the error output. If, however, I leave error_reporting
disabled through script completion, the errors are supressed.
Some additional testing reveals that if I simply put an
error_reporting(0) at the very end of the script, then the errors are
not displayed, regardless of there being @'s in fromt of imap_header()
and/or imap_msgno(). But other warnings (like accessing undefined
variables) are still thrown.
------------------------------------------------------------------------
[2002-03-28 09:59:33] sander@php.net
E_NONE just doesn't exist :)
------------------------------------------------------------------------
[2002-03-28 09:44:32] dshadow@zort.net
Putting error_reporting(0) supresses the errors. I can use this
temporarially, but it's not an effective long-term solution.
E_NONE does not seem to be defined! Should I file a separate bug for
this?
------------------------------------------------------------------------
[2002-03-27 19:41:48] mfischer@php.net
Afaik this is related to how the current error handling in the ext/imap
extension is implemented.
Can you try settings error_reporting(E_NONE); _before_ you call the
function in question and see if it does not output the error message?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/16004
--
Edit this bug report at http://bugs.php.net/?id=16004&edit=1