This patch makes the latest squirrelmail-1.4.23-svn work with php-8.5.12
Environment
Summary
We encountered PHP compatibility warnings and IMAP search/message handling failures in this installation. We previously described related fixes on the squirrelmail-users mailing list under:
“SquirrelMail 1.4.23-svn: PHP 8.5 compatibility and IMAP search/message error handling (patches attached)”
This ticket provides a persistent place to review the core changes and their validation. SquirrelSpell changes are being discussed separately under bug #2869.
Reproduced SEARCH failure
The IMAP reader can discard a valid SEARCH response when the server also returns an unsolicited FETCH flag update.
For example:
Using the affected reader with a SEARCH command returns only the FETCH flag-update group. The caller then reports that no SEARCH response was received, even though the server supplied one.
Expected behavior
Preserve the SEARCH response while keeping unrelated FETCH responses and message literal contents out of search-result parsing.
Proposed changes
Validation
The SEARCH failure was reproduced locally using the affected reader and a controlled IMAP response fixture.
Regression tests cover SEARCH responses mixed with flag updates, empty search results, exclusion of FETCH literal contents from search parsing, and body retrieval with unrelated response groups.
The deployed changes passed PHP syntax checks and regression tests under PHP 8.5.12. PHP-FPM configuration validation and reload also succeeded.
Limitations
These are targeted compatibility and response-handling fixes, not a claim of complete PHP 8.5 compatibility.
An IMAP success response without body data can be legitimate when the requested UID no longer exists. The changes improve handling and diagnostics; they cannot recover a removed message.
Separate mailbox-list rendering warnings remain under investigation.
Patch baseline
The public diff needs to identify the exact upstream revision or source-file hashes used for comparison. Our production snapshot date should not be treated as proof that every issue remains present in current SM-1_4-STABLE.
Dave Wreski
Guardian Digital