diff --git a/library/think/Request.php b/library/think/Request.php index da3194fa..0d7610fd 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -1409,7 +1409,7 @@ class Request * 生成请求令牌 * @access public * @param string $name 令牌名称 - * @param string|array $type 令牌生成方法 + * @param mixed $type 令牌生成方法 * @return string */ public function token($name = '__token__', $type = 'md5') diff --git a/library/think/Validate.php b/library/think/Validate.php index 0148e2e7..475edbc9 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -480,9 +480,10 @@ class Validate * @access protected * @param mixed $value 字段值 * @param string $rule 验证规则 + * @param array $data 验证数据 * @return bool */ - protected function is($value, $rule, $data) + protected function is($value, $rule, $data = []) { switch ($rule) { case 'require':