Merge pull request #27021 from nextcloud/backport/26963/stable21
[stable21] Fix log error when creating files from an empty template
This commit is contained in:
commit
3306c2fb35
|
@ -158,6 +158,7 @@ class TemplateManager implements ITemplateManager {
|
|||
}
|
||||
$folder = $userFolder->get(dirname($filePath));
|
||||
$targetFile = $folder->newFile(basename($filePath));
|
||||
$template = null;
|
||||
if ($templateType === 'user' && $templateId !== '') {
|
||||
$template = $userFolder->get($templateId);
|
||||
$template->copy($targetFile->getPath());
|
||||
|
|
Loading…
Reference in New Issue