Bug #80438 [Asn->Csd]: imap_msgno() incorrectly warns on valid UIDs in PHP 8.0.0
| From: | girgias@php.net | Date: | Mon, 30 Nov 2020 14:09:32 +0000 |
| Subject: | Bug #80438 [Asn->Csd]: imap_msgno() incorrectly warns on valid UIDs in PHP 8.0.0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-230732@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80438&edit=1
ID: 80438
Updated by: girgias@php.net
Reported by: kenai dot whitt at extraale dot com
Summary: imap_msgno() incorrectly warns on valid UIDs in PHP
8.0.0
-Status: Assigned
+Status: Closed
Type: Bug
Package: IMAP related
PHP Version: 8.0.0
Assigned To: girgias
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of girgias
Revision: http://git.php.net/?p=php-src.git;a=commit;h=0076b47326e53d98b5df56c5f970b2b5cc3d9b6d
Log: Fix Bug #80438: imap_msgno() incorrectly warns and return false on valid UIDs in PHP 8.0.0
Previous Comments:
------------------------------------------------------------------------
[2020-11-30 04:55:05] girgias@php.net
The following pull request has been associated:
Patch Name: Fix Bug #80438: imap_msgno() incorrectly warns and return false on valid UIDs in PHP
8.0.0
On GitHub: https://github.com/php/php-src/pull/6468
Patch: https://github.com/php/php-src/pull/6468.patch
------------------------------------------------------------------------
[2020-11-30 04:27:05] girgias@php.net
I can't make a reproducible but I've figured out the root issue.
The function reuses a macro to check for invalid message numbers, something which does not apply to
imap_msgno() as it works on a unique ID which might not be in order depending on the mailbox server.
------------------------------------------------------------------------
[2020-11-28 15:30:06] kenai dot whitt at extraale dot com
Description:
------------
IMAP works in PHP 7.4.x and earlier. In PHP 8.0.0, it breaks by flooding the error log with this:
"imap_msgno(): Bad message number"
I have asked about it here: https://stackoverflow.com/questions/65031547/what-has-changed-in-php-8-which-causes-imap-msgno-to-claim-bad-message-number
I was told to report this here.
Test script:
---------------
$message_number_array = imap_search($specific_mailbox_connection, 'ALL', SE_UID);
if (count($message_number_array))
{
foreach ($message_number_array as $message_number)
{
$header_info = imap_headerinfo($specific_mailbox_connection,
imap_msgno($specific_mailbox_connection, $message_number));
[...]
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80438&edit=1