diff --git a/CRM/Utils/Mail/Incoming.php b/CRM/Utils/Mail/Incoming.php index 12e97e50125f..f0d580c570c3 100644 --- a/CRM/Utils/Mail/Incoming.php +++ b/CRM/Utils/Mail/Incoming.php @@ -92,7 +92,7 @@ public static function formatMailPart($part, &$attachments) { return NULL; } - CRM_Core_Error::fatal(ts("No clue about the %1", array(1 => get_class($part)))); + return self::formatMailUnrecognisedPart($part); } /** @@ -126,7 +126,7 @@ public function formatMailMultipart($part, &$attachments) { return self::formatMailDeliveryStatus($part); } - CRM_Core_Error::fatal(ts("No clue about the %1", array(1 => get_class($part)))); + return self::formatMailUnrecognisedPart($part); } /** @@ -248,6 +248,15 @@ public function formatMailDeliveryStatus($part) { return $t; } + /** + * @param $part + * + * @return string + */ + public function formatUnrecognisedPart($part) { + return ts('Unrecognised message part of type "%1".', array('%1' => get_class($part))); + } + /** * @param $part * @param $attachments