top-think / framework

ThinkPHP Framework
http://www.thinkphp.cn
Other
2.72k stars 1.06k forks source link

think-captcha包bug #3070

Closed 1451544363 closed 1 week ago

1451544363 commented 1 week ago

所属功能组件

其它

ThinkPHP 版本

8.0.3

操作系统

liunx

错误信息

        "topthink/framework": "^8.0.3",
        "topthink/think-orm": "v3.0.14",
        "topthink/think-filesystem": "v2.0.2",
        "topthink/think-multi-app": "v1.0.17",
        "topthink/think-template": "v3.0.0",
        "topthink/think-view": "v2.0.0",
        "topthink/think-captcha": "v3.0.9",
        $captcha_data = Captcha::create(null, true);

        $captcha_key   = md5(uniqid('', true));
        // 验证码10分钟有效
        Cache::set($captcha_key, $captcha_data['code'], 600);
        return [
            'captcha_key' => $captcha_key,
            'img' => $captcha_data['img'],
        ];
升级多应用后此段代码报错,Captcha::create结构跟以前不兼容了

其它说明

No response

liu21st commented 1 week ago

更新到最新版本create方法的第二个参数已经废弃了的 改成配置了