Skip to content
Snippets Groups Projects
Commit 3143121b authored by Joseph Olstad's avatar Joseph Olstad Committed by Joseph Olstad
Browse files

Issue #3360213 by vgutekunst, joseph.olstad: Deprecated function: fnmatch()

parent 9477bc9a
Branches
Tags 8.x-2.0-rc1
1 merge request!13Draft: Automated Project Update Bot fixes
......@@ -360,6 +360,10 @@ function file_entity_match_mimetypes($needle, $haystack) {
foreach ($haystack as $mimetype) {
foreach ($needle as $search) {
if (is_null($search) || is_null($mimetype)) {
// Passing null to parameter of type string is deprecated.
continue;
}
if (fnmatch($search, $mimetype) || fnmatch($mimetype, $search)) {
return TRUE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment