Fix log error when creating files from an empty template
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
51e279918f
commit
80cda3b174
|
@ -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