site crashes if header is invalid #2343

This commit is contained in:
Andy Miller
2019-03-15 05:10:19 -06:00
parent ab535ec8be
commit cd8f578b39
2 changed files with 2 additions and 1 deletions

View File

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

View File

@@ -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(),