Fix issue with http_build_url:
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 16 Nov 2010 20:00:59 +0000 (15:00 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 16 Nov 2010 20:02:22 +0000 (15:02 -0500)
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

index 92bc6bf..2d05d4a 100644 (file)
@@ -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 = '';