Skip to content

Commit

Permalink
update empty
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Jun 4, 2019
1 parent dc04ab6 commit c7289e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ protected function signature(){
$param=$this->sort($param);

$host_tmp=explode('https://', $this->host);
$temp=$this->type . "\n" . $host_tmp[1] . "\n" . $this->path . "\n" . implode('&', $param);
$signature=base64_encode(hash_hmac('sha256', $temp, $this->secret, true));
if(isset($host_tmp[1])) $temp=$this->type . "\n" . $host_tmp[1] . "\n" . $this->path . "\n" . implode('&', $param);
$signature=base64_encode(hash_hmac('sha256', $temp ?? '', $this->secret, true));

$param[]="Signature=" . urlencode($signature);

Expand Down

0 comments on commit c7289e2

Please sign in to comment.