summaryrefslogtreecommitdiff
path: root/ext/imap/tests
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-10-13 19:38:10 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-10-13 19:38:31 +0200
commitd9058b61fb3e1ef0697433324716a8843e92c115 (patch)
tree9ebe90a3f76b50715b43c851b26537d5e4e6a09e /ext/imap/tests
parent8fd8a1b1288f84a6d0892ffc9f61c02846462433 (diff)
parentdb8bf0a9e07f906ad5d771142e5873688aff8033 (diff)
downloadphp-git-d9058b61fb3e1ef0697433324716a8843e92c115.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #64076: imap_sort() does not return FALSE on failure
Diffstat (limited to 'ext/imap/tests')
-rw-r--r--ext/imap/tests/bug64076.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/imap/tests/bug64076.phpt b/ext/imap/tests/bug64076.phpt
new file mode 100644
index 0000000000..ccafcfe251
--- /dev/null
+++ b/ext/imap/tests/bug64076.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #64076 (imap_sort() does not return FALSE on failure)
+--SKIPIF--
+<?php
+require_once __DIR__ . '/skipif.inc';
+?>
+--FILE--
+<?php
+require_once __DIR__ . '/imap_include.inc';
+$stream = setup_test_mailbox('', 2);
+imap_errors(); // clear error stack
+var_dump(imap_sort($stream, SORTFROM, 0, 0, 'UNSUPPORTED SEARCH CRITERIUM'));
+var_dump(imap_errors() !== false);
+?>
+--CLEAN--
+<?php
+require_once __DIR__ . '/clean.inc';
+?>
+--EXPECT--
+Create a temporary mailbox and add 2 msgs
+.. mailbox '{127.0.0.1:143/norsh}INBOX.phpttest' created
+bool(false)
+bool(true)