diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-02-21 09:38:21 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-02-21 09:38:21 +0100 |
commit | 7c851e669e660655b6d7bd59dd2cd7cfe7d5fff3 (patch) | |
tree | 1500ec702bb588206d77d0770dcd4e3f080310d3 | |
parent | 726297e5f8d84cbb434f9c4185f3cd1aaebe8e6e (diff) |
Don't try to print file extension in a warning message if it's not available
-rw-r--r-- | program/steps/mail/get.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index 84e666fbe..54d1a4e77 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -162,7 +162,10 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) { html::div(array('class' => 'rcmail-inline-message rcmail-inline-warning'), rcube_label(array( 'name' => 'attachmentvalidationerror', - 'vars' => array('expected' => "$mimetype (.$file_extension)", 'detected' => "$real_mimetype (.$extensions[0])") + 'vars' => array( + 'expected' => $mimetype . ($file_extension ? "(.$file_extension)" : ''), + 'detected' => $real_mimetype . ($extensions[0] ? "(.$extensions[0])" : ''), + ) )) . html::p(array('class' => 'rcmail-inline-buttons'), html::tag('button', |