overtrue / laravel-wechat

微信 SDK for Laravel, 基于 overtrue/wechat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot use object of type EasyWeChat\OfficialAccount\Application as array

zbage opened this issue · comments

commented

Route::get('/test',function(){
$user = session('easywechat.oauth_user.default');
// dd($user);
echo 'hello:'.$user['id'];
})->middleware(['easywechat.oauth'])->name('test');

local.ERROR: Cannot use object of type EasyWeChat\OfficialAccount\Application as array {"exception":"[object] (Error(code: 0): Cannot use object of type EasyWeChat\OfficialAccount\Application as array at ...../testing_laravel9/vendor/overtrue/laravel-wechat/src/ServiceProvider.php:73)

还没改完哈

已修复

commented

local.ERROR: Undefined property: EasyWeChat\OfficialAccount\Application::$oauth {"exception":"[object] (ErrorException(code: 0): Undefined property: EasyWeChat\OfficialAccount\Application::$oauth at .../testing_laravel9/vendor/overtrue/laravel-wechat/src/Middleware/OAuthAuthenticate.php:73)