Skip to content

Commit 1924423

Browse files
authored
Handle NULL Image URLs in Pixel Ratio Plugin
1 parent 122a8be commit 1924423

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Plugin/AdaptivePixelRatioPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function beforeToHtml(Image $subject)
6868
$srcSet = [];
6969
$imageUrl = $subject->getData('image_url');
7070
$pixelRatiosArray = $this->config->getImageOptimizationRatios();
71-
$glue = (strpos($imageUrl, '?') !== false) ? '&' : '?';
71+
$glue = (strpos($imageUrl ?? '', '?') !== false) ? '&' : '?';
7272

7373
# Pixel ratios defaults are based on the table from https://mydevice.io/devices/
7474
# Bulk of devices are 2x however many new devices like Samsung S8, iPhone X etc are 3x and 4x

0 commit comments

Comments
 (0)