|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-05-18 12:57 UTC] cajus at naasa dot net
Description: ------------ When connecting IMAP servers via imap_open, I'm hiding messages. This doesn't not work for imap_open, neither with error_reporting(0), nor with @. Reproduce code: --------------- $mbox = @imap_open($cfg['connect'], $admin, $password, OP_HALFOPEN); Expected result: ---------------- No output Actual result: -------------- Notice: (null)(): Connection failed to vserver-02.test.net, 143: Connection refused (errflg=2) in Unknown on line 0 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 19:00:02 2025 UTC |
In Debian, log_errors seems to be set to Off by default. I've noticed that defining a dummy error handler before hides the message - but this is no real solution: 8<------------------------------------------ function eh($errno, $errstr, $errfile, $errline) {} ... $tmp= set_error_handler('eh'); $mbox = @imap_open($c, $a, $p, OP_HALFOPEN); set_error_handler($tmp); ... 8<------------------------------------------