In the searchAction of the controller, it is stored in Session/Bag as follows.
However, the array returned by getParams() contains di, and Closure exists in it, so it cannot be serialized, so it fails to save to the session.
$this->persistent->searchParams = $query->getParams();
This failure can be avoided by excluding the key di from the array returned by getParams().
for example
$params = $query->getParams();
unset($params['di']);
$this->persistent->searchParams = $params;
or
$this->persistent->searchParams = array('di'=>null) + $query->getParams();
In the searchAction of the controller, it is stored in Session/Bag as follows.
However, the array returned by getParams() contains di, and Closure exists in it, so it cannot be serialized, so it fails to save to the session.
This failure can be avoided by excluding the key di from the array returned by getParams().
for example
or