add clear

This commit is contained in:
2021-04-06 15:31:18 +08:00
parent fedc0bde24
commit 649817e9ef
+6 -6
View File
@@ -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 . "</" . $key . ">";
$string .= "<" . $key . ">" . $value . "</" . $key . ">";
} else {
$.= "<" . $key . "><![CDATA[" . $value . "]]></" . $key . ">";
$string .= "<" . $key . "><![CDATA[" . $value . "]]></" . $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 {