From cf83c26fa80f3f4045014a011495081673537a11 Mon Sep 17 00:00:00 2001 From: sc0Vu Date: Sun, 25 Feb 2018 17:44:35 +0800 Subject: [PATCH] Fix bug throw exception when value is integer. --- src/RLP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RLP.php b/src/RLP.php index c050c3e..4b55a64 100644 --- a/src/RLP.php +++ b/src/RLP.php @@ -39,7 +39,7 @@ public function encode($inputs) $length = $input->length(); if ($length === 1 && $input[0] < 128) { - return $input[0]; + return [$input[0]]; } else { return $output->concat($this->encodeLength($length, 128), $input); }