Skip to content

Commit

Permalink
Prevent warnings with some HTML attachments.
Browse files Browse the repository at this point in the history
HTML attachments may be rewritten on download to adjust links to images
that are stored in RT as separate attachments.  The function that does
the rewrite may return undef if there is nothing to rewrite, causing a
'Use of uninitialized value' warning.
  • Loading branch information
bconry-bps committed Mar 15, 2022
1 parent 956dc88 commit abdc57c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions share/html/Ticket/Attachment/dhandler
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ elsif (lc $content_type eq 'text/html') {
Content => \$content,
Attachment => $AttachmentObj,
);
$count //= 0; # RewriteInlineImages can return undef when nothing needs to be rewritten
RT->Logger->debug("Rewrote $count CID images when displaying original HTML attachment #$attach");
}

Expand Down

0 comments on commit abdc57c

Please sign in to comment.