thinkphp 5.1 Validate验证类 only 方法存在bug

浏览:1196 发布日期:2020/09/17
5.0.0 - 严重 - 未处理
版本:thinkphp 5.1

check方法里调用only方法前调用了$this->getScene($scene);

getScene方法里有这么一段代码        if (empty($scene)) {
            // 读取指定场景
            $scene = $this->currentScene;
        }

        $this->only = $this->append = $this->remove = [];

        if (empty($scene)) {
            return;
        }
会把only设置的需要验证的字段清除,6.0,5.1之前的几个版本没这个问题
评论(
后面还有条评论,点击查看>>