From c027ba7709a86c23038428de15ffed503e67c522 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 6 May 2013 12:07:05 +0200 Subject: Fix bugs caught by static analysis --- program/steps/mail/compose.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'program/steps/mail/compose.inc') diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 7205d12da..f4a1daf58 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -639,7 +639,7 @@ function rcmail_prepare_message_body() function rcmail_compose_part_body($part, $isHtml = false) { - global $RCMAIL, $MESSAGE, $compose_mode; + global $RCMAIL, $MESSAGE, $LINE_LENGTH, $compose_mode; // Check if we have enough memory to handle the message in it // #1487424: we need up to 10x more memory than the body @@ -1224,10 +1224,11 @@ function rcmail_save_image($path, $mimetype='') // handle attachments in memory $data = file_get_contents($path); + $name = rcmail_basename($path); $attachment = array( 'group' => $COMPOSE['id'], - 'name' => rcmail_basename($path), + 'name' => $name, 'mimetype' => $mimetype ? $mimetype : rc_mime_content_type($path, $name), 'data' => $data, 'size' => strlen($data), -- cgit v1.2.3