Skip to content

Commit

Permalink
Compatibility with PHP 8.2 (#39)
Browse files Browse the repository at this point in the history
Resolved the deprecation issue

Deprecated: Use of "self" in callables is deprecated in /var/www/html/test/vendor/elecena/amazon-s3-php-class/S3.php on line 2010
Deprecated: Use of "self" in callables is deprecated in /var/www/html/test/vendor/elecena/amazon-s3-php-class/S3.php on line 2014

Co-authored-by: Maciej Brencz <[email protected]>
  • Loading branch information
ricci69 and macbre authored Feb 13, 2023
1 parent d1ffaea commit 1e0b917
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions S3.php
Original file line number Diff line number Diff line change
Expand Up @@ -2007,11 +2007,11 @@ public static function __getSignatureV4($amzHeaders, $headers, $method, $uri, $p
$combinedHeaders[strtolower($k)] = trim($v);
foreach ($amzHeaders as $k => $v)
$combinedHeaders[strtolower($k)] = trim($v);
uksort($combinedHeaders, array('self', '__sortMetaHeadersCmp'));
uksort($combinedHeaders, array('S3', '__sortMetaHeadersCmp'));

// Convert null query string parameters to strings and sort
$parameters = array_map('strval', $parameters);
uksort($parameters, array('self', '__sortMetaHeadersCmp'));
uksort($parameters, array('S3', '__sortMetaHeadersCmp'));
$queryString = http_build_query($parameters, '' /* $numeric_prefix */, '&', PHP_QUERY_RFC3986);

// Payload
Expand Down

0 comments on commit 1e0b917

Please sign in to comment.