mirror of
https://github.com/silverstripe/silverstripe-textextraction
synced 2024-10-22 09:06:00 +00:00
FIX Case insensitive extension matching
This commit is contained in:
parent
a6cc647d01
commit
14816075b8
@ -35,9 +35,10 @@ abstract class FileTextExtractor extends Object {
|
||||
}
|
||||
foreach(self::$sorted_extractor_classes as $className => $priority) {
|
||||
$formatter = new $className();
|
||||
if(in_array($extension, $formatter->supportedExtensions())) {
|
||||
return $formatter;
|
||||
}
|
||||
$matched = array_filter($formatter->supportedExtensions(), function($compare) use($extension) {
|
||||
return (strtolower($compare) == strtolower($extension));
|
||||
});
|
||||
if($matched) return $formatter;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user