fix for bad page dates + changelog update

This commit is contained in:
Andy Miller
2024-02-03 13:45:35 -07:00
parent ad8b1b79bd
commit f9f5781af8
2 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -1330,7 +1330,11 @@ abstract class Utils
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