mirror of
https://github.com/silverstripe/silverstripe-textextraction
synced 2024-10-22 11:06:00 +02: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) {
|
foreach(self::$sorted_extractor_classes as $className => $priority) {
|
||||||
$formatter = new $className();
|
$formatter = new $className();
|
||||||
if(in_array($extension, $formatter->supportedExtensions())) {
|
$matched = array_filter($formatter->supportedExtensions(), function($compare) use($extension) {
|
||||||
return $formatter;
|
return (strtolower($compare) == strtolower($extension));
|
||||||
}
|
});
|
||||||
|
if($matched) return $formatter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user