From 8702ec97a728cf1f63f864e493cdc337a3369af6 Mon Sep 17 00:00:00 2001 From: Sarim Khan Date: Wed, 27 Sep 2023 04:12:24 +0600 Subject: [PATCH 1/2] Scopes constructor handle null parameter --- src/Auth/Scopes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Auth/Scopes.php b/src/Auth/Scopes.php index 5b8958e8..3bd5a718 100644 --- a/src/Auth/Scopes.php +++ b/src/Auth/Scopes.php @@ -21,7 +21,7 @@ public function __construct($scopes) if (is_string($scopes)) { $scopesArray = explode(self::SCOPE_DELIMITER, $scopes); } else { - $scopesArray = $scopes; + $scopesArray = $scopes ?? []; } $scopesArray = array_unique(array_filter(array_map('trim', $scopesArray))); From 8e2c751375a7f8dcc83f1eb9a8a4c1a7c113bd1a Mon Sep 17 00:00:00 2001 From: Sarim Khan Date: Wed, 27 Sep 2023 04:16:51 +0600 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bebb6dd..b1d1516f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +- [#299](https://github.com/Shopify/shopify-api-php/pull/299) [Patch] Fix Scopes constructor to be able to handle null parameter - [#297](https://github.com/Shopify/shopify-api-php/pull/297) [Patch] Fix CustomerAddress methods, FulfillmentRequest save method ## v5.1.0 - 2023-07-11