Fatal error: Uncaught Error: Cannot use object of type User as array
This commit is contained in:
@@ -3,7 +3,7 @@ session_start();
|
||||
if (!($_SESSION['uid'] > 0)) header("Location: index.php");
|
||||
require_once 'config.php';
|
||||
|
||||
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $playerId)->fetch_assoc();
|
||||
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $playerId)->fetch_object();
|
||||
$can_go_ch = 0;
|
||||
|
||||
/*if($user['id']==1258)
|
||||
@@ -17,17 +17,17 @@ $can_go_ch = 0;
|
||||
}
|
||||
}*/
|
||||
|
||||
if ($user['room'] != 49) {
|
||||
if ($user->room != 49) {
|
||||
header("Location: main.php");
|
||||
die();
|
||||
exit();
|
||||
}
|
||||
if ($user['battle'] != 0) {
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
die();
|
||||
exit();
|
||||
}
|
||||
|
||||
//проверяем ЦХ
|
||||
if ($user['level'] >= 8 && $user['doblest'] >= 50) $can_go_ch = 1;
|
||||
if ($user->level >= 8 && $user->doblest >= 50) $can_go_ch = 1;
|
||||
|
||||
//заходим в ЦХ
|
||||
if ($_POST['c_haos']) {
|
||||
|
||||
Reference in New Issue
Block a user