Skip to content

Commit

Permalink
Hot fix for PHP8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
anakushoska authored Mar 24, 2022
1 parent 16b9498 commit 601a85d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions S3.php
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ public static function __getSignatureV4($amzHeaders, $headers, $method, $uri, $p
// Convert null query string parameters to strings and sort
$parameters = array_map('strval', $parameters);
uksort($parameters, array('self', '__sortMetaHeadersCmp'));
$queryString = http_build_query($parameters, null, '&', PHP_QUERY_RFC3986);
$queryString = http_build_query($parameters, "", '&', PHP_QUERY_RFC3986);

// Payload
$amzPayload = array($method);
Expand Down Expand Up @@ -2370,8 +2370,8 @@ public function getResponse()
curl_setopt($curl, CURLOPT_HTTPHEADER, $httpHeaders);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, false);
curl_setopt($curl, CURLOPT_WRITEFUNCTION, array(&$this, '__responseWriteCallback'));
curl_setopt($curl, CURLOPT_HEADERFUNCTION, array(&$this, '__responseHeaderCallback'));
curl_setopt($curl, CURLOPT_WRITEFUNCTION, array($this, '__responseWriteCallback'));
curl_setopt($curl, CURLOPT_HEADERFUNCTION, array($this, '__responseHeaderCallback'));
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);

// Request types
Expand Down Expand Up @@ -2456,7 +2456,7 @@ public function getResponse()
* @param string &$data Data
* @return integer
*/
private function __responseWriteCallback(&$curl, &$data)
private function __responseWriteCallback($curl, $data)
{
if (in_array($this->response->code, array(200, 206)) && $this->fp !== false)
return fwrite($this->fp, $data);
Expand Down

0 comments on commit 601a85d

Please sign in to comment.