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:
Nicola Fontana 2016-02-28 21:40:34 +01:00
parent 14aa497b80
commit 29b35c7ccf

View File

@ -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);