Browse Source

Merge pull request #139 from harryxu/master

使用isset判断$echoStr是否定义。
dodge 10 years ago
parent
commit
e683dd0338
1 changed files with 2 additions and 2 deletions
  1. 2 2
      wechat.class.php

+ 2 - 2
wechat.class.php

@@ -184,7 +184,7 @@ class Wechat
             $echoStr = isset($_GET["echostr"]) ? $_GET["echostr"]: '';
         }
         if ($return) {
-        		if ($echoStr) {
+        		if (isset($echoStr)) {
         			if ($this->checkSignature($encryptStr)) 
         				return $echoStr;
         			else
@@ -192,7 +192,7 @@ class Wechat
         		} else 
         			return $this->checkSignature($encryptStr);
         } else {
-	        	if ($echoStr) {
+	        	if (isset($echoStr)) {
 	        		if ($this->checkSignature($encryptStr))
 	        			die($echoStr);
 	        		else