php-imap
php-imap copied to clipboard
[BUG] Mailbox::getMailsInfo throw exception on long array
Environment (please complete the following information):
- PHP IMAP version: 3.1.0
- PHP Version: 8.0
- Type of execution: CLI
Describe the bug Mailbox::getMailsInfo throw Argument 1 passed to PhpImap\Imap::fetch_overview() did not appear to be a valid message id range or sequence! exception on long array. This is because preg_match return false on long string. http://sandbox.onlinephpfunctions.com/code/b5a6921f9b5beef87fee5bb6c25a359ba8b76702
To Reproduce Steps to reproduce the behavior.
The used code:
$mailbox = new Mailbox();
$mailbox->getMailsInfo(range(1, 8193));
Screenshots / Outputs

Additional context https://github.com/php/php-src/issues/8021