w7corp / easywechat

📦 一个 PHP 微信 SDK
https://easywechat.com
MIT License
10.28k stars 2.4k forks source link

企业微信无法获取oauth实例 #2807

Closed GabbyMrH closed 1 month ago

GabbyMrH commented 5 months ago

我用的环境

问题及现象

参考文档:https://easywechat.com/5.x/wework/oauth.html#%E8%B7%B3%E8%BD%AC%E6%8E%88%E6%9D%83 代码示例

        $config = [
            'corp_id' => 'xxxxxxxxxxxxxxxxx',
            'secret'   => 'xxxxxxxxxx', // 应用的 secret
            'agent_id' => 100001,
        ];

        $app = Factory::work($config);
        dump($app->oauth)

报错信息如下

ErrorException: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in
xxx/vendor/overtrue/wechat/src/Work/OAuth/ServiceProvider.php:56
overtrue commented 1 month ago

参数少了 oauth.callback

overtrue commented 1 month ago

更新到 https://github.com/w7corp/easywechat/releases/tag/5.35.3 可解