Skip to content

Commit 7d56bdd

Browse files
committed
AC-1989: Fix subset of deprecated php usages
- Fixes for php code
1 parent 96102bf commit 7d56bdd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/code/Magento/MediaStorage/App/Media.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ private function createLocalCopy(): void
238238
*/
239239
private function checkMediaDirectoryChanged(): bool
240240
{
241-
return rtrim($this->mediaDirectoryPath, '/') !== rtrim($this->directoryMedia->getAbsolutePath(), '/');
241+
return rtrim($this->mediaDirectoryPath ?? '', '/')
242+
!== rtrim($this->directoryMedia->getAbsolutePath() ?? '', '/');
242243
}
243244

244245
/**

app/code/Magento/SalesRule/Model/Quote/Discount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public function fetch(Quote $quote, Total $total)
296296
$description = $total->getDiscountDescription();
297297
$result = [
298298
'code' => $this->getCode(),
299-
'title' => strlen( is_string($description) ? $description : '') ? __('Discount (%1)', $description) : __('Discount'),
299+
'title' => strlen($description ?? '') ? __('Discount (%1)', $description) : __('Discount'),
300300
'value' => $amount
301301
];
302302
}

0 commit comments

Comments
 (0)