summaryrefslogtreecommitdiffstats
path: root/lib/private/Template/CSSResourceLocator.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-05-19 11:28:40 +0200
committerJoas Schilling <coding@schilljs.com>2017-05-19 11:41:08 +0200
commit4792867357723d52bda2f050ff2abcc3a605ee17 (patch)
tree9bb00cd2ddff63f4b34f08088b956e2dbd2004a6 /lib/private/Template/CSSResourceLocator.php
parent770f37a01c915c1cc6e3eac214af4219e58f16a2 (diff)
downloadnextcloud-server-4792867357723d52bda2f050ff2abcc3a605ee17.tar.gz
nextcloud-server-4792867357723d52bda2f050ff2abcc3a605ee17.zip
Stop infinit loop on invalid settings css/js file
Don't try to find dirname of false... Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Template/CSSResourceLocator.php')
-rw-r--r--lib/private/Template/CSSResourceLocator.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/Template/CSSResourceLocator.php b/lib/private/Template/CSSResourceLocator.php
index 5f210ef307a..0150449ac9f 100644
--- a/lib/private/Template/CSSResourceLocator.php
+++ b/lib/private/Template/CSSResourceLocator.php
@@ -62,6 +62,15 @@ class CSSResourceLocator extends ResourceLocator {
$style = substr($style, strpos($style, '/')+1);
$app_path = \OC_App::getAppPath($app);
$app_url = \OC_App::getAppWebPath($app);
+
+ if ($app_path === false && $app_url === false) {
+ $this->logger->error('Could not find resource {resource} to load', [
+ 'resource' => $app . '/' . $style . '.css',
+ 'app' => 'cssresourceloader',
+ ]);
+ return;
+ }
+
if(!$this->cacheAndAppendScssIfExist($app_path, $style.'.scss', $app)) {
$this->append($app_path, $style.'.css', $app_url);
}