mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge 5c9c5519f365d56b9c51354728b67a8247158e1b into b02ac10fc8495e429d017664ee8ed5efba38357f
This commit is contained in:
commit
f823ec42dc
@ -40,7 +40,18 @@ trait SearchFilterable
|
||||
$filterServiceName = "DataListFilter.{$secondArg}";
|
||||
}
|
||||
}
|
||||
if (is_array($value)) {
|
||||
foreach ($value as $key => $val) {
|
||||
if ($val === '' || $val === 'null') {
|
||||
$value[] = null;
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
if ($value === '' || $value === 'null') {
|
||||
$value = ['', null];
|
||||
}
|
||||
}
|
||||
// Build instance
|
||||
return Injector::inst()->create($filterServiceName, $fieldName, $value, $modifiers);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user