From 5430d73a0ed0291af237461cbec7850fedd95972 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 19 Sep 2017 17:08:30 +0200 Subject: [PATCH] Fix "webroot not found" when installed to the root of the webserver Signed-off-by: Robin Appelman --- lib/private/Template/CSSResourceLocator.php | 2 +- 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 c8a8c04ab4..1028f31a5e 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 2127161f28..eb6b1d3c59 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',