From 1212c0b84aef8e246d2e148debc1929e4ac9a7b5 Mon Sep 17 00:00:00 2001 From: Arnold Daniels Date: Mon, 31 Aug 2020 12:35:01 +0200 Subject: [PATCH] Minor fix for Guzzle 6+ --- src/Authorizer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Authorizer.php b/src/Authorizer.php index 9e0689b..d2d2a2d 100644 --- a/src/Authorizer.php +++ b/src/Authorizer.php @@ -39,8 +39,9 @@ public static function sign($allowedResource, $authzgen, $handler = null) if (!isset(self::$globalSecret)) trigger_error('$globalSecret is not set', E_USER_WARNING); list($cerfiticateUrl, $timeStart, $timeEnd) = explode(';', $authzgen) + [null, null, null]; + $opts = $handler !== null ? ['handler' => $handler] : []; - $publicKey = self::downloadSigningKey($cerfiticateUrl, ['handler' => $handler]); + $publicKey = self::downloadSigningKey($cerfiticateUrl, $opts); $resourceSecret = join(';', [ $timeStart,