From 5448a101ae10f768788e30d1617fcecbf4cd77c8 Mon Sep 17 00:00:00 2001 From: Anyon Date: Tue, 15 Sep 2020 13:25:36 +0800 Subject: [PATCH] Update Wechat.php --- app/data/controller/api/Wechat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/data/controller/api/Wechat.php b/app/data/controller/api/Wechat.php index 0715b957e..0e670dbcd 100644 --- a/app/data/controller/api/Wechat.php +++ b/app/data/controller/api/Wechat.php @@ -68,7 +68,7 @@ class Wechat extends Controller { $wechat = WechatService::instance(); $this->mode = $this->request->get('mode', 1); - $this->source = $this->request->server('http_referer', $this->request->get('source')); + $this->source = $this->request->server('http_referer', $this->request->get('source', '')); $user = $wechat->getWebOauthInfo($this->source ?: $this->request->url(true), $this->mode, false); if (empty($user['openid'])) { $content = 'alert("Wechat WebOauth failed.")';