Skip to content

Commit eca6ec2

Browse files
committed
Merge remote-tracking branch 'origin/AC-7422_v1' into AC-6762-v1
2 parents 14bfca1 + c2cd515 commit eca6ec2

File tree

9 files changed

+64
-42
lines changed

9 files changed

+64
-42
lines changed

app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class Bundle extends AbstractView
3636
protected $options;
3737

3838
/**
39-
* Catalog product
40-
*
4139
* @var \Magento\Catalog\Helper\Product
4240
*/
4341
protected $catalogProduct;
@@ -405,7 +403,7 @@ private function getConfigData(Product $product, array $options)
405403
*/
406404
private function processOptions(string $optionId, array $options, DataObject $preConfiguredValues)
407405
{
408-
$preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/${optionId}") ?? [];
406+
$preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/{$optionId}") ?? [];
409407
$selections = $options[$optionId]['selections'];
410408
array_walk(
411409
$selections,

app/code/Magento/Paypal/Model/PayLaterConfig.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ class PayLaterConfig
1515
/**
1616
* Configuration key for Styles settings
1717
*/
18-
const CONFIG_KEY_STYLE = 'style';
18+
public const CONFIG_KEY_STYLE = 'style';
1919

2020
/**
2121
* Configuration key for Position setting
2222
*/
23-
const CONFIG_KEY_POSITION = 'position';
23+
public const CONFIG_KEY_POSITION = 'position';
2424

2525
/**
2626
* Checkout payment step placement
2727
*/
28-
const CHECKOUT_PAYMENT_PLACEMENT = 'checkout_payment';
28+
public const CHECKOUT_PAYMENT_PLACEMENT = 'checkout_payment';
2929

3030
/**
3131
* @var Config
@@ -91,11 +91,11 @@ public function getSectionConfig(string $section, string $key)
9191
{
9292
if (!array_key_exists($section, $this->configData)) {
9393
$sectionName = $section === self::CHECKOUT_PAYMENT_PLACEMENT
94-
? self::CHECKOUT_PAYMENT_PLACEMENT : "${section}page";
94+
? self::CHECKOUT_PAYMENT_PLACEMENT : "{$section}page";
9595

9696
$this->configData[$section] = [
97-
'display' => (boolean)$this->config->getPayLaterConfigValue("${sectionName}_display"),
98-
'position' => $this->config->getPayLaterConfigValue("${sectionName}_position"),
97+
'display' => (boolean)$this->config->getPayLaterConfigValue("{$sectionName}_display"),
98+
'position' => $this->config->getPayLaterConfigValue("{$sectionName}_position"),
9999
'style' => $this->getConfigStyles($sectionName)
100100
];
101101
}
@@ -113,17 +113,17 @@ private function getConfigStyles(string $sectionName): array
113113
{
114114
$logoType = $logoPosition = $textColor = $textSize = null;
115115
$color = $ratio = null;
116-
$styleLayout = $this->config->getPayLaterConfigValue("${sectionName}_stylelayout");
116+
$styleLayout = $this->config->getPayLaterConfigValue("{$sectionName}_stylelayout");
117117
if ($styleLayout === 'text') {
118-
$logoType = $this->config->getPayLaterConfigValue("${sectionName}_logotype");
118+
$logoType = $this->config->getPayLaterConfigValue("{$sectionName}_logotype");
119119
if ($logoType === 'primary' || $logoType === 'alternative') {
120-
$logoPosition = $this->config->getPayLaterConfigValue("${sectionName}_logoposition");
120+
$logoPosition = $this->config->getPayLaterConfigValue("{$sectionName}_logoposition");
121121
}
122-
$textColor = $this->config->getPayLaterConfigValue("${sectionName}_textcolor");
123-
$textSize = $this->config->getPayLaterConfigValue("${sectionName}_textsize");
122+
$textColor = $this->config->getPayLaterConfigValue("{$sectionName}_textcolor");
123+
$textSize = $this->config->getPayLaterConfigValue("{$sectionName}_textsize");
124124
} elseif ($styleLayout === 'flex') {
125-
$color = $this->config->getPayLaterConfigValue("${sectionName}_color");
126-
$ratio = $this->config->getPayLaterConfigValue("${sectionName}_ratio");
125+
$color = $this->config->getPayLaterConfigValue("{$sectionName}_color");
126+
$ratio = $this->config->getPayLaterConfigValue("{$sectionName}_ratio");
127127
}
128128

129129
return [

app/code/Magento/Quote/Model/Quote/Address/Rate.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ class Rate extends AbstractModel
4343
protected $_address;
4444

4545
/**
46+
* @var carrier_sort_order
47+
*/
48+
public $carrier_sort_order;
49+
50+
/**
51+
* Check the Quote rate
52+
*
4653
* @return void
4754
*/
4855
protected function _construct()
@@ -51,6 +58,8 @@ protected function _construct()
5158
}
5259

5360
/**
61+
* Set Address id with address before save
62+
*
5463
* @return $this
5564
*/
5665
public function beforeSave()
@@ -63,6 +72,8 @@ public function beforeSave()
6372
}
6473

6574
/**
75+
* Set address
76+
*
6677
* @param \Magento\Quote\Model\Quote\Address $address
6778
* @return $this
6879
*/
@@ -73,6 +84,8 @@ public function setAddress(\Magento\Quote\Model\Quote\Address $address)
7384
}
7485

7586
/**
87+
* Get Method for address
88+
*
7689
* @return \Magento\Quote\Model\Quote\Address
7790
*/
7891
public function getAddress()
@@ -81,6 +94,8 @@ public function getAddress()
8194
}
8295

8396
/**
97+
* Import shipping rate
98+
*
8499
* @param \Magento\Quote\Model\Quote\Address\RateResult\AbstractResult $rate
85100
* @return $this
86101
*/

app/code/Magento/Sales/Helper/Admin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ public function escapeHtmlWithLinks($data, $allowedTags = null)
165165
$domDocument = $this->domDocumentFactory->create();
166166

167167
$internalErrors = libxml_use_internal_errors(true);
168+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
169+
$data = html_entity_decode(htmlentities($data, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'ISO-8859-1');
168170

169-
$data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8');
170171
$domDocument->loadHTML(
171172
'<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>'
172173
);
@@ -192,7 +193,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null)
192193
}
193194
}
194195

195-
$result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES');
196+
$result = htmlspecialchars_decode($domDocument->saveHTML(), ENT_QUOTES);
196197
preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches);
197198
$data = !empty($matches) ? $matches[1] : '';
198199
}

composer.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testMultiStoreRenderPrice(): void
5656

5757
$this->reloadProductPriceInfo();
5858
$this->localeResolver->setLocale('uk_UA');
59-
$this->assertProductStorePrice('simple2', '240,00 ', 'fixturestore');
59+
$this->assertProductStorePrice('simple2', '240,00 ', 'fixturestore');
6060
}
6161

6262
/**
@@ -80,7 +80,7 @@ public function testMultiStoreRenderSpecialPrice(): void
8080

8181
$this->reloadProductPriceInfo();
8282
$this->localeResolver->setLocale('uk_UA');
83-
$this->assertProductStorePrice('simple', 'Special Price 143,76  Regular Price 240,00 ', 'fixturestore');
83+
$this->assertProductStorePrice('simple', 'Special Price 143,76  Regular Price 240,00 ', 'fixturestore');
8484
}
8585

8686
/**
@@ -111,7 +111,7 @@ public function testMultiStoreRenderTierPrice(): void
111111
$this->localeResolver->setLocale('uk_UA');
112112
$this->assertProductStorePrice(
113113
'simple-product-tax-none',
114-
'Buy 2 for 960,00  each and save 80%',
114+
'Buy 2 for 960,00  each and save 80%',
115115
'fixturestore',
116116
self::TIER_PRICE_BLOCK_NAME
117117
);

dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function escapeHtmlWithLinksDataProvider(): array
5555
[
5656
// @codingStandardsIgnoreStart
5757
'Authorized amount of €30.00. Transaction ID: "<a target="_blank" href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"',
58-
'Authorized amount of 30.00. Transaction ID: &quot;<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&amp;id=123456789QWERTY">123456789QWERTY</a>&quot;',
58+
'Authorized amount of &euro;30.00. Transaction ID: &quot;<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&amp;id=123456789QWERTY">123456789QWERTY</a>&quot;',
5959
// @codingStandardsIgnoreEnd
6060
'allowedTags' => ['b', 'br', 'strong', 'i', 'u', 'a'],
6161
],

dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Magento\TestFramework\Helper\Bootstrap;
2222
use Magento\TestFramework\ObjectManager;
2323
use PHPUnit\Framework\MockObject\MockObject;
24+
use Symfony\Component\HttpFoundation\Response;
2425

2526
/**
2627
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -142,6 +143,7 @@ public function testInitFromOrderAndCreateOrderFromQuoteWithAdditionalOptions()
142143
['additional_option_key' => 'additional_option_value'],
143144
$newOrderItem->getProductOptionByCode('additional_options')
144145
);
146+
Response::closeOutputBuffers(1, false);
145147
}
146148

147149
/**

lib/internal/Magento/Framework/Escaper.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Escaper
1717
{
1818
/**
1919
* HTML special characters flag
20+
* @var $htmlSpecialCharsFlag
2021
*/
2122
private $htmlSpecialCharsFlag = ENT_QUOTES | ENT_SUBSTITUTE;
2223

@@ -96,7 +97,7 @@ function ($errorNumber, $errorString) {
9697
}
9798
);
9899
$data = $this->prepareUnescapedCharacters($data);
99-
$string = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8');
100+
$string = @iconv("UTF-8", "ISO-8859-1//IGNORE", $data);
100101
try {
101102
$domDocument->loadHTML(
102103
'<html><body id="' . $wrapperElementId . '">' . $string . '</body></html>'
@@ -113,7 +114,7 @@ function ($errorNumber, $errorString) {
113114
$this->escapeText($domDocument);
114115
$this->escapeAttributeValues($domDocument);
115116

116-
$result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES');
117+
$result = html_entity_decode($domDocument->saveHTML(), ENT_QUOTES, 'UTF-8');
117118
preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches);
118119
return !empty($matches) ? $matches[1] : '';
119120
} else {
@@ -346,6 +347,7 @@ public function escapeCss($string)
346347
* @param string $quote
347348
* @return string|array
348349
* @deprecated 101.0.0
350+
* @see 6729b6e01368248abc33300208eb292c95050203
349351
*/
350352
public function escapeJsQuote($data, $quote = '\'')
351353
{
@@ -366,6 +368,7 @@ public function escapeJsQuote($data, $quote = '\'')
366368
* @param string $data
367369
* @return string
368370
* @deprecated 101.0.0
371+
* @see 6729b6e01368248abc33300208eb292c95050203
369372
*/
370373
public function escapeXssInUrl($data)
371374
{
@@ -414,6 +417,7 @@ private function escapeScriptIdentifiers(string $data): string
414417
* @param bool $addSlashes
415418
* @return string
416419
* @deprecated 101.0.0
420+
* @see 6729b6e01368248abc33300208eb292c95050203
417421
*/
418422
public function escapeQuote($data, $addSlashes = false)
419423
{
@@ -428,6 +432,7 @@ public function escapeQuote($data, $addSlashes = false)
428432
*
429433
* @return \Magento\Framework\ZendEscaper
430434
* @deprecated 101.0.0
435+
* @see 6729b6e01368248abc33300208eb292c95050203
431436
*/
432437
private function getEscaper()
433438
{
@@ -443,6 +448,7 @@ private function getEscaper()
443448
*
444449
* @return \Psr\Log\LoggerInterface
445450
* @deprecated 101.0.0
451+
* @see 6729b6e01368248abc33300208eb292c95050203
446452
*/
447453
private function getLogger()
448454
{

0 commit comments

Comments
 (0)