Skip to content

Commit 5d6f807

Browse files
committed
Merge remote-tracking branch 'trigger/AC-1989' into AC-1963
2 parents 7f055a6 + 410e53c commit 5d6f807

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22
/**
3-
* Media application
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
@@ -45,8 +43,6 @@ class Media implements AppInterface
4543
private $isAllowed;
4644

4745
/**
48-
* Media directory path
49-
*
5046
* @var string
5147
*/
5248
private $mediaDirectoryPath;
@@ -238,7 +234,10 @@ private function createLocalCopy(): void
238234
*/
239235
private function checkMediaDirectoryChanged(): bool
240236
{
241-
return rtrim($this->mediaDirectoryPath, '/') !== rtrim($this->directoryMedia->getAbsolutePath(), '/');
237+
$mediaDirectoryPath = $this->mediaDirectoryPath ? rtrim($this->mediaDirectoryPath, '/') : '';
238+
$directoryMediaAbsolutePath = $this->directoryMedia->getAbsolutePath();
239+
$directoryMediaAbsolutePath = $directoryMediaAbsolutePath ? rtrim($directoryMediaAbsolutePath, '/') : '';
240+
return $mediaDirectoryPath !== $directoryMediaAbsolutePath;
242241
}
243242

244243
/**

app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public function getForm()
215215
public function getJsTemplateName()
216216
{
217217
$templateCode = $this->getModel()->getTemplateCode();
218-
//phpcs:ignore Magento2.Functions.DiscouragedFunction
218+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
219219
return $templateCode ? addcslashes($templateCode, "\"\r\n\\") : '';
220220
}
221221

0 commit comments

Comments
 (0)