File tree 2 files changed +5
-6
lines changed
Newsletter/Block/Adminhtml/Template
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Media application
4
- *
5
3
* Copyright © Magento, Inc. All rights reserved.
6
4
* See COPYING.txt for license details.
7
5
*/
@@ -45,8 +43,6 @@ class Media implements AppInterface
45
43
private $ isAllowed ;
46
44
47
45
/**
48
- * Media directory path
49
- *
50
46
* @var string
51
47
*/
52
48
private $ mediaDirectoryPath ;
@@ -238,7 +234,10 @@ private function createLocalCopy(): void
238
234
*/
239
235
private function checkMediaDirectoryChanged (): bool
240
236
{
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 ;
242
241
}
243
242
244
243
/**
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ public function getForm()
215
215
public function getJsTemplateName ()
216
216
{
217
217
$ templateCode = $ this ->getModel ()->getTemplateCode ();
218
- //phpcs:ignore Magento2.Functions.DiscouragedFunction
218
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
219
219
return $ templateCode ? addcslashes ($ templateCode , "\"\r\n\\" ) : '' ;
220
220
}
221
221
You can’t perform that action at this time.
0 commit comments