Jelajahi Sumber

Merge branch 'work'

binsee 10 tahun lalu
induk
melakukan
349ca416fd
1 mengubah file dengan 10 tambahan dan 5 penghapusan
  1. 10 5
      Thinkphp/Wechat.class.php

+ 10 - 5
Thinkphp/Wechat.class.php

@@ -350,12 +350,17 @@ class Wechat
 	 */
 	public function getRevEvent(){
 		if (isset($this->_receive['Event'])){
-			return array(
-				'event'=>$this->_receive['Event'],
-				'key'=>$this->_receive['EventKey'],
-			);
-		} else 
+			$array['event'] = $this->_receive['Event'];
+		}
+		if (isset($this->_receive['EventKey'])){
+			$array['key'] = $this->_receive['EventKey'];
+		}
+		
+		if (isset($array) && count($array) > 0) {
+			return $array;
+		} else {
 			return false;
+		} 
 	}
 	
 	/**