From 0ab73fe5e23c3cfe068abf28be4b139838273c6b Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Wed, 23 Aug 2023 14:19:27 +0300 Subject: [PATCH] PHP Warning: Undefined array key "battle" --- _incl_data/class/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_incl_data/class/User.php b/_incl_data/class/User.php index 0ecf9362..ec8afd12 100644 --- a/_incl_data/class/User.php +++ b/_incl_data/class/User.php @@ -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); }