keep some default value be integer 2

This commit is contained in:
xiaomlove
2021-01-06 02:19:03 +08:00
parent 28ab56fe70
commit 38dae7c068
25 changed files with 100 additions and 100 deletions

View File

@@ -16,7 +16,7 @@ function bark($msg) {
if (!mkglobal("id"))
bark($lang_delete['std_missing_form_date']);
$id = $id ?? 0;
$id = intval($id ?? 0);
if (!$id)
die();
@@ -28,7 +28,7 @@ if (!$row)
if ($CURUSER["id"] != $row["owner"] && get_user_class() < $torrentmanage_class)
bark($lang_delete['std_not_owner']);
$rt = $_POST["reasontype"] ?? 0;
$rt = intval($_POST["reasontype"] ?? 0);
if (!is_int($rt) || $rt < 1 || $rt > 5)
bark($lang_delete['std_invalid_reason']."$rt.");