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 0b5a573
for 3.2 that does not add a new API, as
required by #5056 to be semver compatible.
This commit is contained in:
parent
cdedee130a
commit
11561aeb54
@ -226,7 +226,15 @@ abstract class ModelAdmin extends LeftAndMain {
|
|||||||
|
|
||||||
public function getList() {
|
public function getList() {
|
||||||
$context = $this->getSearchContext();
|
$context = $this->getSearchContext();
|
||||||
$params = $this->request->requestVar('q');
|
$params = $this->getRequest()->requestVar('q');
|
||||||
|
|
||||||
|
if(is_array($params)) {
|
||||||
|
$trimRecursive = function($v) use(&$trimRecursive) {
|
||||||
|
return is_array($v) ? array_map($trimRecursive, $v) : trim($v);
|
||||||
|
};
|
||||||
|
$params = $trimRecursive($params);
|
||||||
|
}
|
||||||
|
|
||||||
$list = $context->getResults($params);
|
$list = $context->getResults($params);
|
||||||
|
|
||||||
$this->extend('updateList', $list);
|
$this->extend('updateList', $list);
|
||||||
|
Loading…
Reference in New Issue
Block a user