Skip to content

Commit

Permalink
Merge pull request #35 from liuqiandev/patch-1
Browse files Browse the repository at this point in the history
fixed:php 8.0兼容
  • Loading branch information
noaccident authored Jan 19, 2022
2 parents d9321bc + 52040c3 commit e7dc4d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Obs/Internal/SendRequestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ public function createSignedUrl(array $args=[]){
if (strcasecmp($this -> signature, 'v4') === 0) {
return $this -> createV4SignedUrl($args);
}
return $this->createCommonSignedUrl($args, $this->signature);
return $this->createCommonSignedUrl($this->signature,$args);
}

public function createV2SignedUrl(array $args=[]) {
return $this->createCommonSignedUrl($args, 'v2');
return $this->createCommonSignedUrl( 'v2',$args);
}

private function createCommonSignedUrl(array $args=[], $signature) {
private function createCommonSignedUrl(string $signature,array $args=[]) {
if(!isset($args['Method'])){
$obsException = new ObsException('Method param must be specified, allowed values: GET | PUT | HEAD | POST | DELETE | OPTIONS');
$obsException-> setExceptionType('client');
Expand Down Expand Up @@ -715,4 +715,4 @@ function (RequestException $exception) use ($model, $operation, $params, $callba
}
);
}
}
}

0 comments on commit e7dc4d0

Please sign in to comment.