From 7ec10ea76753e2f2fce70f450ce68a366e8e3edf Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 16 Nov 2010 15:00:59 -0500 Subject: [PATCH] Fix issue with http_build_url: http_build_url automatically includes the path of the called script if the 'path' entry is missing or empty. Make sure we include a trailing slash to avoid mangling the url --- kronolith/lib/Event.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index 92bc6bf2c..2d05d4a8a 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -2046,6 +2046,9 @@ abstract class Kronolith_Event $url = @parse_url($url); if ($url) { if (function_exists('http_build_url')) { + if (empty($url['path'])) { + $url['path'] = '/'; + } $url = http_build_url($url); } else { $new_url = ''; -- 2.11.0