integers must be integers

This commit is contained in:
Igor Barkov [iwork] 2019-02-15 14:46:19 +02:00
parent aa3a5dd32b
commit 1f06924bf2

View File

@ -18,9 +18,9 @@ if ($user['battle'] != 0) {
$get = urldecode(filter_input(INPUT_SERVER, 'QUERY_STRING'));
$itemCost = filter_input(INPUT_GET, $_GET['kredit'], FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
$itemId = filter_input(INPUT_GET, $_GET['n'], FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
$returningItemId = filter_input(INPUT_GET, $_GET['back'], FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
$itemCost = (int)filter_input(INPUT_GET, $_GET['kredit'], FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
$itemId = (int)filter_input(INPUT_GET, $_GET['n'], FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
$returningItemId = (int)filter_input(INPUT_GET, $_GET['back'], FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
if ($itemCost && $itemId) {
$commission = ceil($itemCost / 10); # 10% от суммы с округлением вверх.