Prevent imap mail tests from borking instead of skipping

As of commit e49593a[1], run-tests.php is rather picky regarding the
output of SKIPIF sections, so we have to suppress warnings for failing
imap_open().

[1] <http://git.php.net/?p=php-src.git;a=commit;h=e49593a7c3159a5673ce74b4e5133f1264dc313f>
This commit is contained in:
Christoph M. Becker 2020-04-02 12:50:38 +02:00
parent 59e0674185
commit 737f7dd8f6

View File

@ -18,7 +18,7 @@ $password = 'p4ssw0rd';
$options = OP_HALFOPEN; // this should be enough to verify server present
$retries = 0; // don't retry connect on failure
$mbox = imap_open($mailbox, $username, $password, $options, $retries);
$mbox = @imap_open($mailbox, $username, $password, $options, $retries);
if (!$mbox) {
die("skip could not connect to mailbox $mailbox");
}