Skip to content

Commit

Permalink
Merge pull request #7880 from Sesquipedalian/avatar_upload_extension
Browse files Browse the repository at this point in the history
Fixes bug where uploaded avatars would have two dots before extension
  • Loading branch information
Sesquipedalian authored Nov 13, 2023
2 parents 53097a3 + 3dee6a6 commit 1423041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -3055,7 +3055,7 @@ protected function setAvatarAttachment(string $filepath): string|null
}

// Move to its final name and location. Error on failure.
if (!$image->move($upload_dir . '/avatar_' . $this->id . '_' . time() . '.' . image_type_to_extension($image->type)))
if (!$image->move($upload_dir . '/avatar_' . $this->id . '_' . time() . image_type_to_extension($image->type)))
{
ErrorHandler::fatalLang('attach_timeout', 'critical');
}
Expand Down

0 comments on commit 1423041

Please sign in to comment.