Skip to content

Commit 37a89cd

Browse files
ENGCOM-5506: Cleaning some code gaps #23782
- Merge Pull Request #23782 from Stepa4man/magento2:code_cleanup - Merged commits: 1. a3d86cd 2. 9125b5f
2 parents 794977a + 9125b5f commit 37a89cd

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

app/code/Magento/PageCache/Model/Config.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,18 @@ protected function _getReplacements()
214214
*/
215215
protected function _getAccessList()
216216
{
217-
$result = '';
218-
$tpl = " \"%s\";";
217+
$tpl = ' "%s";';
219218
$accessList = $this->_scopeConfig->getValue(self::XML_VARNISH_PAGECACHE_ACCESS_LIST);
220219
if (!empty($accessList)) {
221-
$result = [];
220+
$ipsList = [];
222221
$ips = explode(',', $accessList);
223222
foreach ($ips as $ip) {
224-
$result[] = sprintf($tpl, trim($ip));
223+
$ipsList[] = sprintf($tpl, trim($ip));
225224
}
226-
return implode("\n", $result);
225+
return implode("\n", $ipsList);
227226
}
228-
return $result;
227+
228+
return '';
229229
}
230230

231231
/**

app/code/Magento/Sales/Model/Order/Email/SenderBuilder.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,9 @@ public function sendCopyTo()
8585
$copyTo = $this->identityContainer->getEmailCopyTo();
8686

8787
if (!empty($copyTo) && $this->identityContainer->getCopyMethod() == 'copy') {
88+
$this->configureEmailTemplate();
8889
foreach ($copyTo as $email) {
89-
$this->configureEmailTemplate();
90-
9190
$this->transportBuilder->addTo($email);
92-
9391
$transport = $this->transportBuilder->getTransport();
9492
$transport->sendMessage();
9593
}

0 commit comments

Comments
 (0)