Merge pull request #41995 from nextcloud/fix/template-manager-templatedirectory-empty

fix(TemplateManager): Bail early if templatedirectory is empty
This commit is contained in:
Joas Schilling 2023-12-04 10:39:50 +01:00 committed by GitHub
commit 1066f7e6e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);