Bug #80438 [Asn]: imap_msgno() incorrectly warns on valid UIDs in PHP 8.0.0
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 has broken in PHP 8 when it worked in 7.4.x and
earlier.
+Summary: imap_msgno() incorrectly warns on valid UIDs in PHP
8.0.0
Status: Assigned
Type: Bug
Package: IMAP related
-Operating System: Windows/probably any
+Operating System:
PHP Version: 8.0.0
Assigned To: girgias
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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
Thread (4 messages)