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
|
@ -159,6 +159,7 @@ class TemplateManager implements ITemplateManager {
|
||||||
}
|
}
|
||||||
$folder = $userFolder->get(dirname($filePath));
|
$folder = $userFolder->get(dirname($filePath));
|
||||||
$targetFile = $folder->newFile(basename($filePath));
|
$targetFile = $folder->newFile(basename($filePath));
|
||||||
|
$template = null;
|
||||||
if ($templateType === 'user' && $templateId !== '') {
|
if ($templateType === 'user' && $templateId !== '') {
|
||||||
$template = $userFolder->get($templateId);
|
$template = $userFolder->get($templateId);
|
||||||
$template->copy($targetFile->getPath());
|
$template->copy($targetFile->getPath());
|
||||||
|
|
Loading…
Reference in New Issue