From 276f3df9e3766856d6cd638f71510570db6505ff Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Tue, 21 Apr 2020 14:00:48 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89=E3=83=A9?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E5=AE=9F=E8=A1=8C=E6=99=82,=20Undefined=20in?= =?UTF-8?q?dex=20=E3=81=AB=E3=81=AA=E3=82=8B=E3=81=AE=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Storage/Handler/SameSiteNoneCompatSessionHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } }