Catch Throwable for #1914

This commit is contained in:
the-djmaze 2025-06-16 17:35:11 +02:00
parent 24bb509b96
commit ba496919dd

View file

@ -65,9 +65,9 @@ abstract class DateTimeHelper
}
return $timestamp;
} catch (\Error $error) {
} catch (\Throwable $error) {
// Catch integer overflow or other fatal errors
\SnappyMail\Log::notice('', "Failed to parse RFC 2822 date '{$sDateTime}'");
\SnappyMail\Log::notice('', "Failed to parse RFC 2822 date '{$sDateTime}'. {$error->getMessage()}");
return 0;
}
}