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 <[email protected]>
  • Loading branch information
juliusknorr authored and backportbot[bot] committed May 19, 2021
1 parent 51e2799 commit 80cda3b
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 @@ -158,6 +158,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 80cda3b

Please sign in to comment.