Skip to content

Error when loading Mouf if cookie contains array #157

@Zheness

Description

@Zheness

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions