diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-05-06 12:07:05 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-05-06 12:08:13 +0200 |
commit | 78c270c9f259c33b703cfb26b96b8dbb062db21e (patch) | |
tree | 201579445599534a703482ae7fd65be9011f397c /program/steps/mail | |
parent | e4f288c3fe8cba1e271d346ec393c02db0793773 (diff) |
Fix bugs caught by static analysis
Diffstat (limited to 'program/steps/mail')
-rw-r--r-- | program/steps/mail/compose.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index dae1d43e5..5a1b65ade 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -630,7 +630,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 @@ -1212,10 +1212,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), |