mirror of
https://github.com/getgrav/grav.git
synced 2026-03-06 12:31:53 +01:00
Fix to force all Page::taxonomy to be treated as strings #2446
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
1. [](#bugfix)
|
||||
* Rework logic to pull out excluded files from pipeline more reliably [#2445](https://github.com/getgrav/grav/issues/2445)
|
||||
* Better logic in `Utils::normalizePath` to handle externals properly [#2216](https://github.com/getgrav/grav/issues/2216)
|
||||
* Fix to force all `Page::taxonomy` to be treated as strings [#2446](https://github.com/getgrav/grav/issues/2446)
|
||||
|
||||
# v1.6.3
|
||||
## 04/12/2019
|
||||
|
||||
@@ -414,9 +414,7 @@ class Page implements PageInterface
|
||||
$this->markdown_extra = (bool)$this->header->markdown_extra;
|
||||
}
|
||||
if (isset($this->header->taxonomy)) {
|
||||
foreach ((array)$this->header->taxonomy as $taxonomy => $taxitems) {
|
||||
$this->taxonomy[$taxonomy] = (array)$taxitems;
|
||||
}
|
||||
$this->taxonomy($this->header->taxonomy);
|
||||
}
|
||||
if (isset($this->header->max_count)) {
|
||||
$this->max_count = (int)$this->header->max_count;
|
||||
@@ -2296,6 +2294,9 @@ class Page implements PageInterface
|
||||
public function taxonomy($var = null)
|
||||
{
|
||||
if ($var !== null) {
|
||||
array_walk_recursive($var, function(&$value) {
|
||||
$value = (string) $value;
|
||||
});
|
||||
$this->taxonomy = $var;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user