mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #5104 from ntd/pr3
FIX Do not hang on nested parameters in search context
This commit is contained in:
commit
6c74481462
@ -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