diff options
author | Marcel Klehr <mklehr@gmx.net> | 2023-12-04 08:29:37 +0100 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2023-12-04 08:53:52 +0100 |
commit | 062a0efed5e62e5aaabbc763b0807736061b8581 (patch) | |
tree | f1c57ecc8d8994acc47a3527a8c34cc58c663a7c /lib | |
parent | df7bc46eab01ee50eba0af7e51c876bfad2625a7 (diff) | |
download | nextcloud-server-062a0efed5e62e5aaabbc763b0807736061b8581.tar.gz nextcloud-server-062a0efed5e62e5aaabbc763b0807736061b8581.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.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Files/Template/TemplateManager.php b/lib/private/Files/Template/TemplateManager.php index 28e9e4f69e8..9d9f6416208 100644 --- a/lib/private/Files/Template/TemplateManager.php +++ b/lib/private/Files/Template/TemplateManager.php @@ -275,6 +275,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); |