Skip to content

Commit

Permalink
update PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
davidduong90 authored Sep 22, 2022
1 parent 05f514e commit 1992c65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Block/Categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ public function getImageUrl($image)
if(is_object($image)){
$image = $image->getImage();
}
if(strpos($image, "media/"))$image = strstr($image,'/media');
if(strpos($image ?? '', "media/"))$image = strstr($image,'/media');
elseif($image!=NULL){
$image = 'catalog/category/'.$image;
}
$image = str_replace('media/', '', $image);
$image = str_replace('media/', '', $image ?? '');

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

0 comments on commit 1992c65

Please sign in to comment.