From e68d2a15f52dcc13e5b2a84a3d2f8645ccb5cec1 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 21 Feb 2013 09:38:21 +0100 Subject: Don't try to print file extension in a warning message if it's not available --- program/steps/mail/get.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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', -- cgit v1.2.3