From fc7b6eb10db75a648fb7ac43cc78b4ee04311d98 Mon Sep 17 00:00:00 2001 From: kink Date: Fri, 27 Nov 2009 09:25:08 +0000 Subject: [PATCH] need to move strtolower inside if-block to prevent notice when attached file has no extention git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13876 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/attachment_common.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/functions/attachment_common.php b/functions/attachment_common.php index f14b17c4..d8627461 100644 --- a/functions/attachment_common.php +++ b/functions/attachment_common.php @@ -269,11 +269,10 @@ function attachment_common_octet_stream(&$Args) { $Ext = ''; if (is_array($Regs) && isset($Regs[1])) { - $Ext = $Regs[1]; + $Ext = $Regs[1]; + $Ext = strtolower($Regs[1]); } - $Ext = strtolower($Regs[1]); - if ($Ext == '' || ! isset($FileExtensionToMimeType[$Ext])) return; -- 2.25.1