fix undefined array key error

This commit is contained in:
saparatayev 2022-05-03 17:31:38 +05:00
parent 4aca27c940
commit 80ddd8a8bd
1 changed files with 3 additions and 1 deletions

View File

@ -26,7 +26,9 @@ class CheckOctoberSession
// For Birzha User's session
try{
if(env('APP_ENV') == 'production') {
if(env('APP_ENV') == 'production'
&& isset(preg_split("/[\s\[\]\",]+/", \Cookie::get('user_auth'))[1])) {
$userId = preg_split("/[\s\[\]\",]+/", \Cookie::get('user_auth'))[1];
$user = BirzhaUser::find($userId);