Closed almeric closed 2 years ago
Hi,
I've ran into an issue using the v4 version of this plugin (for craft 4).
Here: https://github.com/nystudio107/craft-cookies/blob/bc5aea1f64bee21c7aa789acff2d74591236e672/src/twigextensions/CookiesTwigExtension.php#L65-L74
The $sameSite param is required to be a boolean.
$sameSite
But here: https://github.com/nystudio107/craft-cookies/blob/bc5aea1f64bee21c7aa789acff2d74591236e672/src/twigextensions/CookiesTwigExtension.php#L55
and here: https://github.com/nystudio107/craft-cookies/blob/bc5aea1f64bee21c7aa789acff2d74591236e672/src/twigextensions/CookiesTwigExtension.php#L42
$sameSite has a default value of null which gives the following error when setting a cookie without explicitly passing the $sameSite param:
null
CookiesTwigExtension::setCookie(): Argument #8 ($sameSite) must be of type bool, null given
Addressed in 4.0.0 -> https://github.com/nystudio107/craft-cookies/releases/tag/4.0.0
Hi,
I've ran into an issue using the v4 version of this plugin (for craft 4).
Here: https://github.com/nystudio107/craft-cookies/blob/bc5aea1f64bee21c7aa789acff2d74591236e672/src/twigextensions/CookiesTwigExtension.php#L65-L74
The
$sameSite
param is required to be a boolean.But here: https://github.com/nystudio107/craft-cookies/blob/bc5aea1f64bee21c7aa789acff2d74591236e672/src/twigextensions/CookiesTwigExtension.php#L55
and here: https://github.com/nystudio107/craft-cookies/blob/bc5aea1f64bee21c7aa789acff2d74591236e672/src/twigextensions/CookiesTwigExtension.php#L42
$sameSite
has a default value ofnull
which gives the following error when setting a cookie without explicitly passing the $sameSite param: