Фикс деления на ноль

This commit is contained in:
lopar 2018-06-23 20:02:30 +03:00
parent 7343ba8e25
commit 0c275b9eda

View File

@ -16,9 +16,9 @@ if ($user['battle'] != 0) {
die();
}
$sellItemId = empty($_GET['sellitem']) ?: $_GET['sellitem'];
$sellItemId = filter_input(INPUT_GET,'sellitem');
if ($sellItemId > 0) {
if ($sellItemId && is_numeric($sellItemId)) {
$dress = db::c()->query('SELECT `id`, `name`, `cost`, `type`, `duration`, `maxdur`, `goden`, `dategoden`, `koll` FROM `inventory` WHERE `dressed` = 0 AND `id` = ?i AND `owner` = ?i', $sellItemId, $user['id'])->fetch_assoc();
$price = $dress['cost'] * 1;
$kols = '';