From e447a8d0389e614bb620e4ad06fcd810749cbbe4 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sun, 15 May 2022 17:00:14 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20GET=EC=9D=80=20int=EB=A5=BC=20arg?= =?UTF-8?q?=EB=A1=9C=20=EB=B0=9B=EC=9D=84=20=EC=88=98=20=EC=97=86=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/API/Betting/GetBettingDetail.php | 3 ++- hwe/sammo/API/Global/GetHistory.php | 6 ++++-- hwe/sammo/API/Nation/GetGeneralLog.php | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hwe/sammo/API/Betting/GetBettingDetail.php b/hwe/sammo/API/Betting/GetBettingDetail.php index 086a2f50..017780f6 100644 --- a/hwe/sammo/API/Betting/GetBettingDetail.php +++ b/hwe/sammo/API/Betting/GetBettingDetail.php @@ -18,11 +18,12 @@ class GetBettingDetail extends \sammo\BaseAPI $v->rule('required', [ 'betting_id', ]) - ->rule('int', 'betting_id'); + ->rule('integer', 'betting_id'); if (!$v->validate()) { return $v->errorStr(); } + $this->args['betting_id'] = (int)$this->args['betting_id']; return null; } diff --git a/hwe/sammo/API/Global/GetHistory.php b/hwe/sammo/API/Global/GetHistory.php index 40b2554d..afd068f4 100644 --- a/hwe/sammo/API/Global/GetHistory.php +++ b/hwe/sammo/API/Global/GetHistory.php @@ -25,14 +25,16 @@ class GetHistory extends \sammo\BaseAPI $v = new Validator($this->args); $v->rule('required', ['year', 'month']) ->rule('lengthMin', 'serverID', 1) - ->rule('int', 'year') - ->rule('int', 'month'); + ->rule('integer', 'year') + ->rule('integer', 'month'); if (!$v->validate()) { return $v->errorStr(); } if (!$this->args['serverID']) { $this->args['serverID'] = UniqueConst::$serverID; } + $this->args['year'] = (int)$this->args['year']; + $this->args['month'] = (int)$this->args['month']; return null; } diff --git a/hwe/sammo/API/Nation/GetGeneralLog.php b/hwe/sammo/API/Nation/GetGeneralLog.php index 0b2ccc30..857d0b61 100644 --- a/hwe/sammo/API/Nation/GetGeneralLog.php +++ b/hwe/sammo/API/Nation/GetGeneralLog.php @@ -30,7 +30,7 @@ class GetGeneralLog extends \sammo\BaseAPI 'generalID', 'type', ]) - ->rule('int', [ + ->rule('integer', [ 'generalID', 'reqTo', ])