From 82869b6d814560283c0d0771437cbd6f98cd102f Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 12 Jan 2018 23:56:25 +0100 Subject: Fix case when overwrite URL is empty during setup Found while testing strict typing for PHP 7+. Signed-off-by: Morris Jobke --- lib/private/Setup.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/private/Setup.php') 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 : '/'; -- cgit v1.2.3