From c8381f1fca557369aee2beee3255501f0fc1cdc8 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sat, 4 Sep 2010 22:31:49 -0400 Subject: [PATCH] Ensure 'path' exists before accessing it. $puri might not contain 'path', in fact it might not contain *any* keys if $uri that is passed into the function is '#' --- framework/Core/lib/Horde.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index b5d02d337..2c69ade51 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -954,11 +954,11 @@ HTML; $url = $protocol . '://' . $server_name; } - if ($puri['path'][0] == '/') { + if (isset($puri['path']) && $puri['path'][0] == '/') { $url .= $puri['path']; } else { $webroot = $GLOBALS['registry']->get('webroot', empty($opts['app']) ? null : $opts['app']); - $url .= '/' . ltrim($webroot, '/') . '/' . $puri['path']; + $url .= '/' . ltrim($webroot, '/') . '/' . (isset($puri['path']) ? $puri['path'] : ''); } if (isset($puri['query'])) { -- 2.11.0