summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-15 17:55:23 +0100
committerGitHub <noreply@github.com>2018-01-15 17:55:23 +0100
commitfc9f5fdfc403561e4e5372ce432f3624357dbd52 (patch)
tree87ae6d868c2af1c9c8098e325ee66cd3ff220179
parent9ddfccc52f6d7085bb590d7eb68e7025995a7547 (diff)
parent82869b6d814560283c0d0771437cbd6f98cd102f (diff)
downloadnextcloud-server-fc9f5fdfc403561e4e5372ce432f3624357dbd52.tar.gz
nextcloud-server-fc9f5fdfc403561e4e5372ce432f3624357dbd52.zip
Merge pull request #7835 from nextcloud/fix-empty-overwrite-url-in-setup
Fix case when overwrite URL is empty during setup
-rw-r--r--core/Command/Maintenance/UpdateHtaccess.php2
-rw-r--r--lib/private/Setup.php3
2 files changed, 4 insertions, 1 deletions
diff --git a/core/Command/Maintenance/UpdateHtaccess.php b/core/Command/Maintenance/UpdateHtaccess.php
index 4b9c8a72b52..001f07187d6 100644
--- a/core/Command/Maintenance/UpdateHtaccess.php
+++ b/core/Command/Maintenance/UpdateHtaccess.php
@@ -43,7 +43,7 @@ class UpdateHtaccess extends Command {
$output->writeln('.htaccess has been updated');
return 0;
} else {
- $output->writeln('<error>Error updating .htaccess file, not enough permissions?</error>');
+ $output->writeln('<error>Error updating .htaccess file, not enough permissions or "overwrite.cli.url" set to an invalid URL?</error>');
return 1;
}
}
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 92246e8322e..43fa6c4a117 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -437,6 +437,9 @@ class Setup {
return false;
}
$webRoot = parse_url($webRoot, PHP_URL_PATH);
+ if ($webRoot === null) {
+ return false;
+ }
$webRoot = rtrim($webRoot, '/');
} else {
$webRoot = !empty(\OC::$WEBROOT) ? \OC::$WEBROOT : '/';