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

Error when loading Mouf if cookie contains array #157

Open
Zheness opened this issue Jul 24, 2019 · 0 comments
Open

Error when loading Mouf if cookie contains array #157

Zheness opened this issue Jul 24, 2019 · 0 comments

Comments

@Zheness
Copy link
Contributor

Zheness commented Jul 24, 2019

Hello Mouf team !

I have an issue when loading Mouf home page:

Warning: urlencode() expects parameter 1 to be string, array given in /var/www/html/vendor/mouf/mouf/src/Mouf/Reflection/MoufReflectionProxy.php on line 297

I found out it's because one of my $_COOKIE is an array:

key = webform-941[1563959232]
value = 1563959232

(Coming from Drupal when saving a form)

When it arrive into PHP, the $value is:

{"1563959232":"1563959232"}

So considered as array.

Is it possible to fix ?

Thank you :)

$cookieArr[] = $key."=".urlencode($value);

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