From 6f3e596369784b4ef0d37c2bc1ffb1f318e75a0e Mon Sep 17 00:00:00 2001 From: "Igor Barkov (iwork)" Date: Mon, 20 Jul 2020 12:43:48 +0300 Subject: [PATCH] Notice: Undefined variable: user --- main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.php b/main.php index 3e8c4d5..9d7d71e 100644 --- a/main.php +++ b/main.php @@ -325,8 +325,8 @@ function countmf() //global $user; // Защита от урона и сокрушение? - $zo = db::c()->query('SELECT 1 FROM `users_effects` WHERE `type` = 201 AND `owner_id` = ?i', $user['id'])->getNumRows(); - $sokr = db::c()->query('SELECT 1 FROM `users_effects` WHERE `type` = 202 AND `owner_id` = ?i', $user['id'])->getNumRows(); + $zo = db::c()->query('SELECT 1 FROM `users_effects` WHERE `type` = 201 AND `owner_id` = ?i', $_SESSION['uid'])->getNumRows(); + $sokr = db::c()->query('SELECT 1 FROM `users_effects` WHERE `type` = 202 AND `owner_id` = ?i', $_SESSION['uid'])->getNumRows(); $user = new User($_SESSION['uid']); $userDressedItems = new DressedItems($_SESSION['uid']);