diff --git a/CHANGELOG.md b/CHANGELOG.md index c2ee029cc..6c011d1c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ * Removed `media.upload_limit` references * Twig `nicenumber`: do not use 0 + string casting hack * Converted Twig tags to use namespaced Twig classes + * Site shows error on page rather than hard-crash when page has invalid frontmatter [#2343](https://github.com/getgrav/grav/issues/2343) 1. [](#bugfix) * Grav 1.6: Fixed `FlexUser` loosing ACL information * Grav 1.6: Fixed `FlexUser::find()` breaking when nothing is found diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 5c16bbabb..2020d80b0 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -346,7 +346,7 @@ class Page implements PageInterface $this->processFrontmatter(); } } - } catch (ParseException $e) { + } catch (\Exception $e) { $file->raw(Grav::instance()['language']->translate([ 'GRAV.FRONTMATTER_ERROR_PAGE', $this->slug(),