From aa2cef744415688bdc5eeaded86935eefa1a6503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E7=A5=9E=E5=AE=97?= Date: Mon, 3 Aug 2020 14:00:29 +0800 Subject: [PATCH] Fixed RPC Sign (#227) --- src/Support/Sign.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Support/Sign.php b/src/Support/Sign.php index 214319fe..1310d3d4 100644 --- a/src/Support/Sign.php +++ b/src/Support/Sign.php @@ -111,6 +111,9 @@ public static function rpcString($method, array $parameters) ksort($parameters); $canonicalized = ''; foreach ($parameters as $key => $value) { + if ($value === null || $value === '') { + continue; + } $canonicalized .= '&' . self::percentEncode($key) . '=' . self::percentEncode($value); }