diff options
author | Joas Schilling <coding@schilljs.com> | 2017-05-19 11:28:40 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-05-19 11:41:08 +0200 |
commit | 4792867357723d52bda2f050ff2abcc3a605ee17 (patch) | |
tree | 9bb00cd2ddff63f4b34f08088b956e2dbd2004a6 /lib/private/Template/ResourceLocator.php | |
parent | 770f37a01c915c1cc6e3eac214af4219e58f16a2 (diff) | |
download | nextcloud-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/ResourceLocator.php')
-rwxr-xr-x | lib/private/Template/ResourceLocator.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/Template/ResourceLocator.php b/lib/private/Template/ResourceLocator.php index e82a77ba65f..4e733d28f26 100755 --- a/lib/private/Template/ResourceLocator.php +++ b/lib/private/Template/ResourceLocator.php @@ -116,6 +116,14 @@ abstract class ResourceLocator { * @throws ResourceNotFoundException Only thrown when $throw is true and the resource is missing */ protected function append($root, $file, $webRoot = null, $throw = true) { + + if (!is_string($root)) { + if ($throw) { + throw new ResourceNotFoundException($file, $webRoot); + } + return; + } + if (!$webRoot) { $tmpRoot = $root; /* |