summaryrefslogtreecommitdiff
path: root/plugins/pdfviewer/pdfviewer.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pdfviewer/pdfviewer.php')
-rw-r--r--plugins/pdfviewer/pdfviewer.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/pdfviewer/pdfviewer.php b/plugins/pdfviewer/pdfviewer.php
index 0b771ea..6f90eb2 100644
--- a/plugins/pdfviewer/pdfviewer.php
+++ b/plugins/pdfviewer/pdfviewer.php
@@ -107,7 +107,7 @@ class pdfviewer extends rcube_plugin
// try to fix invalid application/octet-stream mimetypes for PDF attachments
if ($part->mimetype == 'application/octet-stream' && preg_match('/\.pdf$/', strval($part->filename))) {
- $body = $part->body ? $part->body : $message->get_part_content($part->mime_id, null, true, 2048);
+ $body = $message->get_part_body($part->mime_id, false, 2048);
$real_mimetype = rcube_mime::file_content_type($body, $part->filename, $part->mimetype, true, true);
if (in_array($real_mimetype, $this->pdf_mimetypes)) {
$part->mimetype = $real_mimetype;