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

Fix "webroot not found" when installed to the root of the webserver
This commit is contained in:
Roeland Jago Douma 2017-09-20 20:04:27 +02:00 committed by GitHub
commit 8358c63f53
2 changed files with 4 additions and 4 deletions

View File

@ -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',

View File

@ -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',