Skip to content

Commit

Permalink
Fix log error when creating files from an empty template
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr authored and rullzer committed May 18, 2021
1 parent 83330b8 commit b8d0249
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/Files/Template/TemplateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public function createFromTemplate(string $filePath, string $templateId = '', st
}
$folder = $userFolder->get(dirname($filePath));
$targetFile = $folder->newFile(basename($filePath));
$template = null;
if ($templateType === 'user' && $templateId !== '') {
$template = $userFolder->get($templateId);
$template->copy($targetFile->getPath());
Expand Down

0 comments on commit b8d0249

Please sign in to comment.