Skip to content
Snippets Groups Projects
Commit 8358c63f authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #6573 from nextcloud/nonfound-webroot-empty-string

Fix "webroot not found" when installed to the root of the webserver
parents e8d80ed0 5430d73a
No related branches found
No related tags found
No related merge requests found
...@@ -119,7 +119,7 @@ class CSSResourceLocator extends ResourceLocator { ...@@ -119,7 +119,7 @@ class CSSResourceLocator extends ResourceLocator {
if (!$webRoot) { if (!$webRoot) {
$webRoot = $this->findWebRoot($root); $webRoot = $this->findWebRoot($root);
if (!$webRoot) { if ($webRoot === null) {
$webRoot = ''; $webRoot = '';
$this->logger->error('ResourceLocator can not find a web root (root: {root}, file: {file}, webRoot: {webRoot}, throw: {throw})', [ $this->logger->error('ResourceLocator can not find a web root (root: {root}, file: {file}, webRoot: {webRoot}, throw: {throw})', [
'app' => 'lib', 'app' => 'lib',
......
...@@ -139,7 +139,7 @@ abstract class ResourceLocator { ...@@ -139,7 +139,7 @@ abstract class ResourceLocator {
$tmpRoot = dirname($tmpRoot); $tmpRoot = dirname($tmpRoot);
} }
if (!$webRoot) { if ($webRoot === null) {
$realpath = realpath($root); $realpath = realpath($root);
if ($realpath && ($realpath !== $root)) { if ($realpath && ($realpath !== $root)) {
...@@ -168,10 +168,10 @@ abstract class ResourceLocator { ...@@ -168,10 +168,10 @@ abstract class ResourceLocator {
return; return;
} }
if (!$webRoot) { if ($webRoot === null) {
$webRoot = $this->findWebRoot($root); $webRoot = $this->findWebRoot($root);
if (!$webRoot) { if ($webRoot === null) {
$webRoot = ''; $webRoot = '';
$this->logger->error('ResourceLocator can not find a web root (root: {root}, file: {file}, webRoot: {webRoot}, throw: {throw})', [ $this->logger->error('ResourceLocator can not find a web root (root: {root}, file: {file}, webRoot: {webRoot}, throw: {throw})', [
'app' => 'lib', 'app' => 'lib',
......
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