Отказ от алиаса die в пользу exit, более явная проверка на наличие сессии. Некоторые проверки входа теперь проверяют объекты, а не массив.
This commit is contained in:
+4
-1
@@ -13,7 +13,10 @@ if ($user['battle'] > 0) {
|
||||
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = '{$target}' AND `needident` = 1 LIMIT 1;"));
|
||||
if (mysql_query("UPDATE `inventory` SET `needident` = 0 WHERE `id` = {$dress['id']} LIMIT 1;")) {
|
||||
|
||||
Reference in New Issue
Block a user