mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 20:48:09 +08:00
fix(wechat): 修复网页授权登录在空查询参数下的 parse_str 类型报错
- getWebOauthInfo 中先解析 query 再做字符串兜底 - 避免 source 无 query 时 parse_str 接收 null/false 导致 TypeError - 保持原有 code/rcode/state 参数解析逻辑不变
This commit is contained in:
parent
283aab3e0d
commit
f040b20da3
@ -267,7 +267,8 @@ class WechatService extends Service
|
||||
}
|
||||
if (static::getType() === 'api') {
|
||||
// 解析 GET 参数
|
||||
parse_str(parse_url($source, PHP_URL_QUERY), $params);
|
||||
$query = parse_url($source, PHP_URL_QUERY);
|
||||
parse_str(is_string($query) ? $query : '', $params);
|
||||
$getVars = [
|
||||
'code' => $params['code'] ?? input('code', ''),
|
||||
'rcode' => $params['rcode'] ?? input('rcode', ''),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user