$purl['path'] might be an empty string, avoid warnings
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 2 Oct 2010 20:33:39 +0000 (16:33 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 2 Oct 2010 20:33:39 +0000 (16:33 -0400)
framework/Core/lib/Horde.php

index b9032f0..2d07375 100644 (file)
@@ -956,7 +956,7 @@ HTML;
             $url = $protocol . '://' . $server_name;
         }
 
-        if (isset($puri['path']) && $puri['path'][0] == '/') {
+        if (isset($puri['path']) && substr($puri['path'], 0, 1) == '/') {
             $url .= $puri['path'];
         } else {
             $webroot = ltrim($GLOBALS['registry']->get('webroot', empty($opts['app']) ? null : $opts['app']), '/');