Skip to content
Snippets Groups Projects
Unverified Commit 82869b6d authored by Morris Jobke's avatar Morris Jobke
Browse files

Fix case when overwrite URL is empty during setup


Found while testing strict typing for PHP 7+.

Signed-off-by: default avatarMorris Jobke <hey@morrisjobke.de>
parent 3dc7d0fb
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ class UpdateHtaccess extends Command { ...@@ -43,7 +43,7 @@ class UpdateHtaccess extends Command {
$output->writeln('.htaccess has been updated'); $output->writeln('.htaccess has been updated');
return 0; return 0;
} else { } 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; return 1;
} }
} }
......
...@@ -437,6 +437,9 @@ class Setup { ...@@ -437,6 +437,9 @@ class Setup {
return false; return false;
} }
$webRoot = parse_url($webRoot, PHP_URL_PATH); $webRoot = parse_url($webRoot, PHP_URL_PATH);
if ($webRoot === null) {
return false;
}
$webRoot = rtrim($webRoot, '/'); $webRoot = rtrim($webRoot, '/');
} else { } else {
$webRoot = !empty(\OC::$WEBROOT) ? \OC::$WEBROOT : '/'; $webRoot = !empty(\OC::$WEBROOT) ? \OC::$WEBROOT : '/';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment