diff --git a/CHANGELOG.md b/CHANGELOG.md index 77247c5a22..9755756261 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ # v1.7.45 ## mm/dd/2024 +1. [](#news) + * Added new Image trait for `decoding` attribute [#3796](https://github.com/getgrav/grav/pull/3796) 1. [](#bugfix) * Fixed some multibyte issues in Inflector class [#732](https://github.com/getgrav/grav/issues/732) + * Fallback to paeg modified date if Page date provided is invalid and can't be parsed [getgrav/grav-plugin-admin#2394](https://github.com/getgrav/grav-plugin-admin/issues/2394) # v1.7.44 ## 01/05/2024 diff --git a/system/src/Grav/Common/Utils.php b/system/src/Grav/Common/Utils.php index a0fb949f85..bc56f81a94 100644 --- a/system/src/Grav/Common/Utils.php +++ b/system/src/Grav/Common/Utils.php @@ -1330,7 +1330,11 @@ public static function date2timestamp($date, $format = null) if ($dateformat) { $datetime = DateTime::createFromFormat($dateformat, $date); } else { - $datetime = new DateTime($date); + try { + $datetime = new DateTime($date); + } catch (Exception $e) { + $datetime = false; + } } // fallback to strtotime() if DateTime approach failed