PHP Warning: Undefined array key "battle"

This commit is contained in:
Ivor Barhansky 2023-08-23 14:19:27 +03:00
parent c4aeb53f57
commit 0ab73fe5e2

View File

@ -602,7 +602,7 @@ class User
} }
} }
if (!isset ($_COOKIE['btl']) || $this->info['battle'] != $_COOKIE['btl']) { if (!isset ($_COOKIE['btl'], $this->info['battle']) || $this->info['battle'] != $_COOKIE['btl']) {
setcookie('btl', $this->info['battle'] ?? '', time() + 86400); setcookie('btl', $this->info['battle'] ?? '', time() + 86400);
} }