Browse Source

声明数组方式兼容低版本的PHP ($data = [])

pkkgu 9 years ago
parent
commit
a91eeba3aa
1 changed files with 3 additions and 3 deletions
  1. 3 3
      wechat.class.php

+ 3 - 3
wechat.class.php

@@ -4284,7 +4284,7 @@ class Wechat
 	public function getOrderByFilter($status = null, $begintime = null, $endtime = null){
 		if (!$this->access_token && !$this->checkAuth()) return false;
 
-		$data = [];
+		$data = array();
 
 		$valid_status = array(2, 3, 5, 8);
 		if (is_numeric($status) && in_array($status, $valid_status)) {
@@ -4322,7 +4322,7 @@ class Wechat
 		if (!$this->access_token && !$this->checkAuth()) return false;
 		if (!$order_id) return false;
 
-		$data = [];
+		$data = array();
 		$data['order_id'] = $order_id;
 		if ($need_delivery) {
 			$data['delivery_company'] = $delivery_company;
@@ -4378,7 +4378,7 @@ class Wechat
 		$skuInfo = str_replace("\$", "", $skuInfo);
 		$matches = explode(";", $skuInfo);
 
-		$result = [];
+		$result = array();
 		foreach ($matches as $matche) {
 			$arrs = explode(":", $matche);
 			$result[$arrs[0]] = $arrs[1];