Skip to content

Commit

Permalink
fix: resolve warning when array of image sizes is null.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Sep 24, 2024
1 parent b773b37 commit 1cdc59c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/php/Integrations/Image/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ public function getContainerQueryData(): array {
$this->imageSize[0] ?? null
);

if(!is_array($imageSizes) || empty($imageSizes)) {
return [];
}

$uniqueId = uniqid('item-');

// Declare variables
Expand Down

0 comments on commit 1cdc59c

Please sign in to comment.