diff --git a/lib/Pico.php b/lib/Pico.php index 0a83929..85e3f0a 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -754,10 +754,13 @@ class Pico $content = str_replace('%theme_url%', $themeUrl, $content); // replace %meta.*% - $metaKeys = array_map(function ($metaKey) { - return '%meta.' . $metaKey . '%'; - }, array_keys($this->meta)); - $metaValues = array_values($this->meta); + $metaKeys = $metaValues = array(); + foreach ($this->meta as $metaKey => $metaValue) { + if (is_scalar($metaValue) || ($metaValue === null)) { + $metaKeys[] = '%meta.' . $metaKey . '%'; + $metaValues[] = strval($metaValue); + } + } $content = str_replace($metaKeys, $metaValues, $content); return $content;