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 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)));