summaryrefslogtreecommitdiff
path: root/includes/bootstrap.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r--includes/bootstrap.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 1353daa77..14b0e7907 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -156,7 +156,10 @@ function conf_init() {
if (isset($base_url)) {
// Parse fixed base URL from settings.php.
$parts = parse_url($base_url);
- $base_path = isset($parts['path']) ? $parts['path'] . '/' : '/';
+ if (!isset($parts['path'])) {
+ $parts['path'] = '';
+ }
+ $base_path = $parts['path'] . '/';
// Build $base_root (everything until first slash after "scheme://").
$base_root = substr($base_url, 0, strlen($base_url) - strlen($parts['path']));
}