From 649817e9efb2894b2a39821e96f22e83114aa0b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 6 Apr 2021 15:31:18 +0800 Subject: [PATCH] add clear --- wchat/common/Help.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wchat/common/Help.php b/wchat/common/Help.php index 23bbab7..4528ead 100644 --- a/wchat/common/Help.php +++ b/wchat/common/Help.php @@ -36,17 +36,17 @@ class Help extends Miniprogarampage */ private static function xmlChild(array $array) { - $= ''; + $string = ''; foreach ($array as $key => $value) { if (is_array($value)) { - $.= static::xmlChild($value); + $string .= static::xmlChild($value); continue; } if (is_numeric($value)) { - $.= "<" . $key . ">" . $value . ""; + $string .= "<" . $key . ">" . $value . ""; } else { - $.= "<" . $key . ">"; + $string .= "<" . $key . ">"; } } return $string; @@ -163,7 +163,7 @@ class Help extends Miniprogarampage public static function sign(array $array, $key, $type) { ksort($array, SORT_ASC); - $= []; + $string = []; foreach ($array as $hashKey => $val) { if (empty($val)) { continue; @@ -171,7 +171,7 @@ class Help extends Miniprogarampage $string[] = $hashKey . '=' . $val; } $string[] = 'key=' . $key; - $= implode('&', $string); + $string = implode('&', $string); if ($type == 'MD5') { return strtoupper(md5($string)); } else {