Fix "webroot not found" when installed to the root of the webserver

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/6573/head
Robin Appelman 9 years ago
parent 1995c69928
commit 5430d73a0e
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
  1. 2
      lib/private/Template/CSSResourceLocator.php
  2. 6
      lib/private/Template/ResourceLocator.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',

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

Loading…
Cancel
Save