From 9a5fa7e6998fb07e2555dac4822fbd8eff63d75c Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Sun, 14 Apr 2019 13:08:57 -0600 Subject: [PATCH] Extra forcing of first level arrays in taxonomy --- system/src/Grav/Common/Page/Page.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 7a4dae480..82ff71cb2 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -2294,6 +2294,11 @@ class Page implements PageInterface public function taxonomy($var = null) { if ($var !== null) { + // make sure first level are arrays + array_walk($var, function(&$value) { + $value = (array) $value; + }); + // make sure all values are strings array_walk_recursive($var, function(&$value) { $value = (string) $value; });