|
@@ -706,6 +706,14 @@ function createAttachment(&$attachmentOptions)
|
|
|
$attachmentOptions['mime_type'] = 'image/' . $validImageTypes[$size[2]];
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ if (!empty($attachmentOptions['mime_type']) && strpos($attachmentOptions['mime_time'], 'image/') !== 0)
|
|
|
+ {
|
|
|
+ $attachmentOptions['width'] = 0;
|
|
|
+ $attachmentOptions['height'] = 0;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
if (empty($attachmentOptions['file_hash']))
|
|
|
$attachmentOptions['file_hash'] = getAttachmentFilename($attachmentOptions['name'], false, null, true);
|