瀏覽代碼

Fix 参数拼接错误导致的用户id获取不到。

这种参数拼接的方式,实在不推荐哎,为啥不用http_build_query呢,代码也清楚,还少很多错误。
Yu Bing 10 年之前
父節點
當前提交
571450e424
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      qywechat.class.php

+ 1 - 1
qywechat.class.php

@@ -1641,7 +1641,7 @@ class Wechat
 	public function getUserId($code,$agentid=0){
 	    if (!$agentid) $agentid=$this->agentid;
 	    if (!$this->access_token && !$this->checkAuth()) return false;
-	    $result = $this->http_get(self::API_URL_PREFIX.self::USER_GETINFO_URL.'access_token='.$this->access_token.'&code='.$code.'&agentid'.$agentid);
+	    $result = $this->http_get(self::API_URL_PREFIX.self::USER_GETINFO_URL.'access_token='.$this->access_token.'&code='.$code.'&agentid='.$agentid);
 	    if ($result)
 	    {
 	        $json = json_decode($result,true);