Ignore:
Timestamp:
Sep 8, 2020, 5:57:23 PM (4 years ago)
Author:
chronos
Message:
  • Fixed: MimeTypes for file download was not working as global variable with newer PHP 7.4.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/File/File.php

    r876 r885  
    4343  function DetectMimeType($FileName)
    4444  {
    45     global $MimeTypes;
    46 
    47     $Result = $MimeTypes[pathinfo($FileName, PATHINFO_EXTENSION)][0];
     45    $MimeTypes = GetMimeTypes();
     46    $MimeType = pathinfo($FileName, PATHINFO_EXTENSION);
     47    $Result = $MimeTypes[$MimeType][0];
    4848    return $Result;
    4949  }
Note: See TracChangeset for help on using the changeset viewer.