From 01d496713058e9ac44bda188a4334b7081ac7ce8 Mon Sep 17 00:00:00 2001 From: Axel Helmert Date: Tue, 12 Sep 2017 12:14:27 +0200 Subject: [PATCH] Fix undefined variable $tmpRoot Refactoring of webroot detection left an unused variable. Fixes: #6415 Signed-off-by: Axel Helmert --- lib/private/Template/CSSResourceLocator.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/private/Template/CSSResourceLocator.php b/lib/private/Template/CSSResourceLocator.php index 1b4050e4ae..e4b6890529 100644 --- a/lib/private/Template/CSSResourceLocator.php +++ b/lib/private/Template/CSSResourceLocator.php @@ -128,14 +128,14 @@ class CSSResourceLocator extends ResourceLocator { 'webRoot' => $webRoot, 'throw' => $throw ? 'true' : 'false' ]); + + if ($throw) { + throw new ResourceNotFoundException($file, $webRoot); + } } } - if ($throw && $tmpRoot === '/') { - throw new ResourceNotFoundException($file, $webRoot); - } - - $this->resources[] = array($tmpRoot, $webRoot, $file); + $this->resources[] = array($webRoot? : '/', $webRoot, $file); } } }