Skip to content

Commit 1992c65

Browse files
authored
update PHP 8.1
1 parent 05f514e commit 1992c65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Block/Categories.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@ public function getImageUrl($image)
196196
if(is_object($image)){
197197
$image = $image->getImage();
198198
}
199-
if(strpos($image, "media/"))$image = strstr($image,'/media');
199+
if(strpos($image ?? '', "media/"))$image = strstr($image,'/media');
200200
elseif($image!=NULL){
201201
$image = 'catalog/category/'.$image;
202202
}
203-
$image = str_replace('media/', '', $image);
203+
$image = str_replace('media/', '', $image ?? '');
204204

205205
if($image) {
206206
$url = $this->storeManager->getStore()->getBaseUrl( \Magento\Framework\UrlInterface::URL_TYPE_MEDIA ) . $image;

0 commit comments

Comments
 (0)