From 20e1061bb311a56df61452436f415167f1bd1496 Mon Sep 17 00:00:00 2001 From: Ludovic Chabant Date: Tue, 26 Mar 2013 12:50:43 -0700 Subject: [PATCH] Fixed a bug with tag template objects being slugified. --- src/PieCrust/Util/UriBuilder.php | 4 ++++ 1 file changed, 4 insertions(+) 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)