summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-12-04 08:29:37 +0100
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-12-04 10:12:53 +0000
commit76265de3f15402ae2597e59e586f3b452eb7b26f (patch)
tree6b4de9a3aa190342fda8161335bc8c1440ece5b0 /lib
parentd873dec11767e94990a19a609b2b9db3c7ac339e (diff)
downloadnextcloud-server-76265de3f15402ae2597e59e586f3b452eb7b26f.tar.gz
nextcloud-server-76265de3f15402ae2597e59e586f3b452eb7b26f.zip
fix(TemplateManager): Bail early if templatedirectory is empty
fixes #39266 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Template/TemplateManager.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Files/Template/TemplateManager.php b/lib/private/Files/Template/TemplateManager.php
index bf72e9e23e8..fd4c00b2990 100644
--- a/lib/private/Files/Template/TemplateManager.php
+++ b/lib/private/Files/Template/TemplateManager.php
@@ -274,6 +274,11 @@ class TemplateManager implements ITemplateManager {
$isDefaultTemplates = $skeletonTemplatePath === $defaultTemplateDirectory;
$userLang = $this->l10nFactory->getUserLanguage($this->userManager->get($this->userId));
+ if ($skeletonTemplatePath === '') {
+ $this->setTemplatePath('');
+ return '';
+ }
+
try {
$l10n = $this->l10nFactory->get('lib', $userLang);
$userFolder = $this->rootFolder->getUserFolder($this->userId);