diff --git a/src/PieCrust/Util/UriBuilder.php b/src/PieCrust/Util/UriBuilder.php index 9034e340..a442b00b 100644 --- a/src/PieCrust/Util/UriBuilder.php +++ b/src/PieCrust/Util/UriBuilder.php @@ -148,6 +148,10 @@ public static function slugify($value, $method) if ($reserved == null) $reserved = preg_quote(":/?#[]@!$&'()*+,;=\\ ", '/'); + // Turn the value into a string, as it could actually be an + // instance of `PagePropertyData` or some other thing from the template. + $value = (string)$value; + // Apply the main slugify mode. $mode = ($method & 0x000f); switch ($mode)