diff options
author | Robin Appelman <robin@icewind.nl> | 2017-09-19 17:08:30 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-09-20 14:19:15 +0200 |
commit | 5430d73a0ed0291af237461cbec7850fedd95972 (patch) | |
tree | 99317e252211959f543deac6cba02ac1c122418a | |
parent | 1995c699284a1dc522ccb5d7035fd1dca277b10e (diff) | |
download | nextcloud-server-5430d73a0ed0291af237461cbec7850fedd95972.tar.gz nextcloud-server-5430d73a0ed0291af237461cbec7850fedd95972.zip |
Fix "webroot not found" when installed to the root of the webserver
Signed-off-by: Robin Appelman <robin@icewind.nl>
-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', |