mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
Merge pull request #242 from chrometoasters/pulls/fix-241-list-of-classes
FIX #241 - Support numerically indexed array of classes
This commit is contained in:
commit
d92f4d64cc
@ -186,6 +186,11 @@ abstract class SearchVariant
|
||||
// Construct new array of variants applicable to at least one class in the list
|
||||
$commonVariants = [];
|
||||
foreach ($classes as $class => $options) {
|
||||
// BC for numerically indexed list of classes
|
||||
if (is_numeric($class) && !empty($options['class'])) {
|
||||
$class = $options['class']; // $options['class'] is assumed to exist throughout the code base
|
||||
}
|
||||
|
||||
// Extract relevant class options
|
||||
$includeSubclasses = isset($options['include_children']) ? $options['include_children'] : true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user