Skip to content

Commit 1790ba5

Browse files
committed
MC-22982: Enable template filter strict mode by default
1 parent a009faa commit 1790ba5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function renderArray($addressAttributes, $format = null)
167167
$addressAttributes['country_id']
168168
)->getName();
169169
} elseif ($attributeCode == 'region' && isset($addressAttributes['region'])) {
170-
$data['region'] = __($addressAttributes['region']);
170+
$data['region'] = (string)__($addressAttributes['region']);
171171
} elseif (isset($addressAttributes[$attributeCode])) {
172172
$value = $addressAttributes[$attributeCode];
173173
$dataModel = $this->_elementFactory->create($attributeMetadata, $value, 'customer_address');

dev/tests/integration/testsuite/Magento/Framework/Filter/DirectiveProcessor/SimpleDirectiveTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public function testDefaultFiltersAreUsed()
7474
public function testParametersAreParsed()
7575
{
7676
$filter = $this->objectManager->create(Template::class);
77+
$filter->setStrictMode(false);
7778

7879
$processor = $this->createWithProcessorsAndFilters(
7980
['mydir' => $this->objectManager->create(MyDirProcessor::class)],

0 commit comments

Comments
 (0)