diff --git a/composer.json b/composer.json index b6a2c3a..e63fd0b 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "putyourlightson/craft-blitz-f5", "description": "F5 cache purger for the Blitz plugin.", - "version": "0.0.1", + "version": "0.0.2", "type": "craft-plugin", "homepage": "https://putyourlightson.com/plugins/blitz", "license": "proprietary", diff --git a/src/F5Purger.php b/src/F5Purger.php index a2b77fe..08069a5 100644 --- a/src/F5Purger.php +++ b/src/F5Purger.php @@ -193,8 +193,8 @@ public function getCondensedUriPattern(array $siteUris): string { $uris = array_map(fn($siteUri) => $siteUri->uri, $siteUris); - if (count($uris) < 2) { - return $uris[0]; + if (count($uris) === 1) { + return $uris[0] ?? ''; } // Get the longest common prefix between the two most dissimilar strings.