File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Newsletter/Block/Adminhtml/Template Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 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 /**
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments