mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #64076: imap_sort() does not return FALSE on failure
This commit is contained in:
commit
d9058b61fb
2
NEWS
2
NEWS
@ -2,6 +2,8 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2020, PHP 7.4.13
|
||||
|
||||
- IMAP:
|
||||
. Fixed bug #64076 (imap_sort() does not return FALSE on failure). (cmb)
|
||||
|
||||
29 Oct 2020, PHP 7.4.12
|
||||
|
||||
|
@ -3199,6 +3199,9 @@ PHP_FUNCTION(imap_sort)
|
||||
} else {
|
||||
spg = mail_newsearchpgm();
|
||||
}
|
||||
if (spg == NIL) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
mypgm = mail_newsortpgm();
|
||||
mypgm->reverse = rev;
|
||||
|
23
ext/imap/tests/bug64076.phpt
Normal file
23
ext/imap/tests/bug64076.phpt
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user