From a0f292846916d63e34793c59064b0646894856b1 Mon Sep 17 00:00:00 2001 From: ahwelp Date: Thu, 2 May 2019 04:28:35 +0000 Subject: [PATCH] Update 'src/RR/Request.php' --- src/RR/Request.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/RR/Request.php b/src/RR/Request.php index 3b9215e..eca8421 100755 --- a/src/RR/Request.php +++ b/src/RR/Request.php @@ -10,7 +10,7 @@ class Request{ const PARAM_INT = 'integer'; const PARAM_DOUBLE = 'double'; - public static function requiredParam($parname, $type, $options = Array(), $default = ''){ + public static function requiredParam($parname, $type, $default = '', $options = Array()){ // POST has precedence. if (isset($_POST[$parname])) { $param = $_POST[$parname]; @@ -19,9 +19,8 @@ class Request{ } else { return $default; } - $param = self::filter($type, $param); - + foreach ($options as $key => $option){ self::$key($param, $option); }