diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-09-20 20:04:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-20 20:04:27 +0200 |
commit | 8358c63f53ac2cce177aa3cacee6fa3db7a4eaee (patch) | |
tree | b1a982df74c39a54f90750d83669d9a537075439 | |
parent | e8d80ed071650bb99eb44df55c7a0f60b23d0cdc (diff) | |
parent | 5430d73a0ed0291af237461cbec7850fedd95972 (diff) | |
download | nextcloud-server-8358c63f53ac2cce177aa3cacee6fa3db7a4eaee.tar.gz nextcloud-server-8358c63f53ac2cce177aa3cacee6fa3db7a4eaee.zip |
Merge pull request #6573 from nextcloud/nonfound-webroot-empty-string
Fix "webroot not found" when installed to the root of the webserver
-rw-r--r-- | lib/private/Template/CSSResourceLocator.php | 2 | ||||
-rwxr-xr-x | lib/private/Template/ResourceLocator.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Template/CSSResourceLocator.php b/lib/private/Template/CSSResourceLocator.php index c8a8c04ab47..1028f31a5ea 100644 --- a/lib/private/Template/CSSResourceLocator.php +++ b/lib/private/Template/CSSResourceLocator.php @@ -119,7 +119,7 @@ class CSSResourceLocator extends ResourceLocator { if (!$webRoot) { $webRoot = $this->findWebRoot($root); - if (!$webRoot) { + if ($webRoot === null) { $webRoot = ''; $this->logger->error('ResourceLocator can not find a web root (root: {root}, file: {file}, webRoot: {webRoot}, throw: {throw})', [ 'app' => 'lib', diff --git a/lib/private/Template/ResourceLocator.php b/lib/private/Template/ResourceLocator.php index 2127161f28c..eb6b1d3c594 100755 --- a/lib/private/Template/ResourceLocator.php +++ b/lib/private/Template/ResourceLocator.php @@ -139,7 +139,7 @@ abstract class ResourceLocator { $tmpRoot = dirname($tmpRoot); } - if (!$webRoot) { + if ($webRoot === null) { $realpath = realpath($root); if ($realpath && ($realpath !== $root)) { @@ -168,10 +168,10 @@ abstract class ResourceLocator { return; } - if (!$webRoot) { + if ($webRoot === null) { $webRoot = $this->findWebRoot($root); - if (!$webRoot) { + if ($webRoot === null) { $webRoot = ''; $this->logger->error('ResourceLocator can not find a web root (root: {root}, file: {file}, webRoot: {webRoot}, throw: {throw})', [ 'app' => 'lib', |