Skip to content

Commit

Permalink
Merge pull request #665 from UN-OCHA/berliner/ignore-unsupported-atta…
Browse files Browse the repository at this point in the history
…chments

Ignore attachments with unsupported types
  • Loading branch information
berliner authored Apr 26, 2023
2 parents 5e6fdfc + dd377d3 commit 64e0cba
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ class AttachmentHelper {
public static function processAttachments(array $attachments) {
$processed = [];
foreach ($attachments as $attachment) {
$processed[$attachment->id] = self::processAttachment($attachment);
try {
$processed[$attachment->id] = self::processAttachment($attachment);
}
catch (InvalidTypeException $e) {
// Ignore this for the moment.
}
}
return $processed;
}
Expand Down

0 comments on commit 64e0cba

Please sign in to comment.