diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 68e7d598e8..e7c90acf96 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1126,7 +1126,7 @@ App::post('/v1/account/sessions/anonymous') 'userAgent' => $request->getUserAgent('UNKNOWN'), 'ip' => $request->getIP(), 'factors' => ['anonymous'], - 'countryCode' => $geoRecord['countryCode'], + 'countryCode' => $geoRecord['countryCode'] ?? '', 'expire' => DateTime::addSeconds(new \DateTime(), $duration) ], $detector->getOS(),