From 69857a62b7374ea2e68226cd7de82112ffa39c0e Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Wed, 6 Jan 2021 02:26:28 +0800 Subject: [PATCH] keep some default value be integer 3 --- include/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/functions.php b/include/functions.php index 9ef61961..e97a646a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2934,8 +2934,8 @@ function return_torrent_bookmark_array($userid) function get_torrent_bookmark_state($userid, $torrentid, $text = false) { global $lang_functions; - $userid = $userid ?? 0; - $torrentid = $torrentid ?? 0; + $userid = intval($userid ?? 0); + $torrentid = intval($torrentid ?? 0); $ret = array(); $ret = return_torrent_bookmark_array($userid); if (!count($ret) || !in_array($torrentid, $ret, false)) // already bookmarked