need to move strtolower inside if-block to prevent notice when attached
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 27 Nov 2009 09:25:08 +0000 (09:25 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 27 Nov 2009 09:25:08 +0000 (09:25 +0000)
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

index f14b17c4c3555cc4c3f1bf3207830fef89ddea4b..d862746199f09196a0d24c760268e259d3c43512 100644 (file)
@@ -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;