Skip to content

Commit

Permalink
fix: don't show any text if no attached files are available
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Mar 31, 2020
1 parent 6917162 commit 33bbb81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions phpmyfaq/src/phpMyFAQ/Helper/AttachmentHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public function __construct()
*/
public function renderAttachmentList(array $attachmentList): string
{
if (count($attachmentList) === 0) {
return '';
}

$html = sprintf('<p>%s:</p><ul>', $this->translation['msgAttachedFiles']);

foreach ($attachmentList as $attachment) {
Expand Down

0 comments on commit 33bbb81

Please sign in to comment.