Open mayfinn opened 6 months ago
For completeness, here’s a local workaround for those who need it:
private static function getCookie(): ?string
{
$cookie = $_COOKIE[self::COOKIE_NAME] ?? null;
if (!is_string($cookie) or empty($cookie)) {
return null;
}
return $cookie;
}
I have a problem reading the cookie via your provided functions. I identified the root problem to be the hashing of cookies in Kirby. The
CookieBanner::getCookie
returns null becauseCookie::get
returns null. This is due to the early access in https://github.com/getkirby/kirby/blob/6b7ac66c55ecac20d6b580ef01a667d1806d5c72/src/Http/Cookie.php#L143