Fix #81649: imap_(un)delete accept sequences, not single numbers

As such, the parameter name `$message_num` is utmost misleading; it
should be `$message_nums` as for other functions.

Closes GH-7686.
This commit is contained in:
Christoph M. Becker 2021-11-24 17:03:50 +01:00
parent f9518c3850
commit 179030d167
No known key found for this signature in database
GPG Key ID: D66C9593118BCCB6
3 changed files with 8 additions and 4 deletions

4
NEWS
View File

@ -19,6 +19,10 @@ PHP NEWS
- GD:
. Fixed bug #71316 (libpng warning from imagecreatefromstring). (cmb)
- IMAP:
. Fixed bug #81649 (imap_(un)delete accept sequences, not single numbers).
(cmb)
- OpenSSL:
. Fixed bug #75725 (./configure: detecting RAND_egd). (Dilyan Palauzov)

View File

@ -81,12 +81,12 @@ function imap_expunge($imap): bool {}
/**
* @param resource $imap
*/
function imap_delete($imap, string $message_num, int $flags = 0): bool {}
function imap_delete($imap, string $message_nums, int $flags = 0): bool {}
/**
* @param resource $imap
*/
function imap_undelete($imap, string $message_num, int $flags = 0): bool {}
function imap_undelete($imap, string $message_nums, int $flags = 0): bool {}
/** @param resource $imap */
function imap_check($imap): stdClass|false {}

View File

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: d6d158112a802d867646b8f85402b8762599180b */
* Stub hash: ec8020febecb370ef2e5f19f00cd092ecb198f8c */
ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_open, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
@ -107,7 +107,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_delete, 0, 2, _IS_BOOL, 0)
ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, message_num, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, message_nums, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()