Skip to content
Snippets Groups Projects
Commit edcb6960 authored by Jared Hancock's avatar Jared Hancock Committed by Jared Hancock
Browse files

Ensure case-insensitive file extension comparison

Ensure that when generating the list of acceptable file extensions, that the list is lower cased, because the extension from the filename will be lower-cased before attempting to find the extension in the list of acceptable extensions.
parent 9c9bfae1
No related branches found
No related tags found
No related merge requests found
......@@ -1587,6 +1587,10 @@ class FileUploadField extends FormField {
else {
if ($ext[0] != '.')
$ext = '.' . $ext;
// Ensure that the extension is lower-cased for comparison latr
$ext = strtolower($ext);
// Add this to the MIME types list so it can be exported to
// the @accept attribute
if (!isset($extensions[$ext]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment