mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Do not hang on nested parameters in search context
Backport of 0b5a57389b
for 3.2 that does not add a new API, as
required by #5056 to be semver compatible.
This commit is contained in:
parent
14aa497b80
commit
29b35c7ccf
@ -212,7 +212,10 @@ abstract class ModelAdmin extends LeftAndMain {
|
||||
$params = $this->getRequest()->requestVar('q');
|
||||
|
||||
if(is_array($params)) {
|
||||
$params = array_map('trim', $params);
|
||||
$trimRecursive = function($v) use(&$trimRecursive) {
|
||||
return is_array($v) ? array_map($trimRecursive, $v) : trim($v);
|
||||
};
|
||||
$params = $trimRecursive($params);
|
||||
}
|
||||
|
||||
$list = $context->getResults($params);
|
||||
|
Loading…
Reference in New Issue
Block a user