php-imap
php-imap copied to clipboard
Add date parsing regex case for duplicated dates
I went into this error :
Carbon\Exceptions\InvalidFormatException: Could not parse 'Tue, 30 Sep 2025 15:23:24 -0300 Tue, 30 Sep 2025 15:23:24 -0300': Failed to parse time string (Tue, 30 Sep 2025 15:23:24 -0300 Tue, 30 Sep 2025 15:23:24 -0300) at position 37 (3): Double date specification
This PR fixes the issue.
Note: another regexp was catching the exception (unsuccessfully), and the final error that was throwed was the "Trailing data" error.