Skip to content

Fix imap stubs #6559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/imap/php_imap.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function imap_close($imap, int $flags = 0): bool {}
function imap_num_msg($imap): int|false {}

/** @param resource $imap */
function imap_num_recent($imap): int|false {}
function imap_num_recent($imap): int {}

/** @param resource $imap */
function imap_headers($imap): array|false {}
Expand Down Expand Up @@ -179,7 +179,7 @@ function imap_sort($imap, int $criteria, bool $reverse, int $flags = 0, ?string
function imap_uid($imap, int $message_num): int|false {}

/** @param resource $imap */
function imap_msgno($imap, int $message_uid): int|false {}
function imap_msgno($imap, int $message_uid): int {}

/** @param resource $imap */
function imap_list($imap, string $reference, string $pattern): array|false {}
Expand Down
8 changes: 5 additions & 3 deletions ext/imap/php_imap_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 326cb0410034aecc702e9397cd88ef91adaa254c */
* Stub hash: d6d158112a802d867646b8f85402b8762599180b */

ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_open, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
Expand All @@ -26,7 +26,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_num_msg, 0, 1, MAY_BE_LONG|
ZEND_ARG_INFO(0, imap)
ZEND_END_ARG_INFO()

#define arginfo_imap_num_recent arginfo_imap_num_msg
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_num_recent, 0, 1, IS_LONG, 0)
ZEND_ARG_INFO(0, imap)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, imap)
Expand Down Expand Up @@ -218,7 +220,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_uid, 0, 2, MAY_BE_LONG|MAY_
ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_msgno, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_msgno, 0, 2, IS_LONG, 0)
ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, message_uid, IS_LONG, 0)
ZEND_END_ARG_INFO()
Expand Down