Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Serialization of 'Closure' is not allowed #103

Open
s-ohnishi opened this issue Dec 29, 2022 · 0 comments
Open

Exception: Serialization of 'Closure' is not allowed #103

s-ohnishi opened this issue Dec 29, 2022 · 0 comments

Comments

@s-ohnishi
Copy link
Contributor

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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant