diff --git a/src/Eccube/Session/Storage/Handler/SameSiteNoneCompatSessionHandler.php b/src/Eccube/Session/Storage/Handler/SameSiteNoneCompatSessionHandler.php index 89fad8a7c0c..31da74afdd5 100644 --- a/src/Eccube/Session/Storage/Handler/SameSiteNoneCompatSessionHandler.php +++ b/src/Eccube/Session/Storage/Handler/SameSiteNoneCompatSessionHandler.php @@ -207,6 +207,7 @@ public function getCookieSecure() */ private function shouldSendSameSiteNone() { - return SameSite::handle($_SERVER['HTTP_USER_AGENT']); + $userAgent = array_key_exists('HTTP_USER_AGENT', $_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null; + return SameSite::handle($userAgent); } }