mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #26963 from nextcloud/bugfix/noid/empty-template-error
Fix log error when creating files from an empty template
This commit is contained in:
commit
aa785d266d
1 changed files with 1 additions and 0 deletions
|
|
@ -159,6 +159,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 a new issue