mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 20:37:03 +02:00
Fixed fatal error when site.taxonomies contains a bad value
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# v1.7.1
|
||||
## mm/dd/2021
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fixed fatal error when `site.taxonomies` contains a bad value
|
||||
|
||||
# v1.7.0
|
||||
## 01/19/2021
|
||||
|
||||
|
||||
@@ -74,6 +74,10 @@ class Taxonomy
|
||||
$config = $this->grav['config'];
|
||||
$taxonomies = (array)$config->get('site.taxonomies');
|
||||
foreach ($taxonomies as $taxonomy) {
|
||||
// Skip invalid taxonomies.
|
||||
if (!\is_string($taxonomy)) {
|
||||
continue;
|
||||
}
|
||||
$current = $page_taxonomy[$taxonomy] ?? null;
|
||||
foreach ((array)$current as $item) {
|
||||
$this->iterateTaxonomy($page, $taxonomy, '', $item);
|
||||
|
||||
Reference in New Issue
Block a user