Skip to content

Commit a276405

Browse files
author
mastiuhin-olexandr
committed
MC-24495: Cannot save order with "file"-type address attribute.
1 parent 876c805 commit a276405

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ private function updateRegionData($attributeValues)
176176
*/
177177
private function truncateCustomFileAttributes(array $data): array
178178
{
179-
$foundedArrays = [];
179+
$foundArrays = [];
180180

181181
foreach ($data as $value) {
182182
if (is_array($value)) {
183-
$foundedArrays = $value;
183+
$foundArrays = $value;
184184
}
185185
}
186186

187-
if (empty($foundedArrays)) {
187+
if (empty($foundArrays)) {
188188
return $data;
189189
}
190190

app/code/Magento/Sales/Model/AdminOrder/Create.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,9 +1576,9 @@ private function synchronizeAddressesFileAttributes(): void
15761576
$customAttributes = $this->customAttributeList->getAttributes();
15771577
foreach ($customAttributes as $attribute) {
15781578
$attributeCode = $attribute->getAttributeCode();
1579-
if ($attribute->getFrontendInput() === 'file' &&
1580-
!empty($billingAddress->getData($attributeCode)) &&
1581-
empty($shippingAddress->getData($attributeCode))
1579+
if ($attribute->getFrontendInput() === 'file'
1580+
&& !empty($billingAddress->getData($attributeCode))
1581+
&& empty($shippingAddress->getData($attributeCode))
15821582
) {
15831583
$shippingAddress->setData($attributeCode, $billingAddress->getData($attributeCode));
15841584
}

0 commit comments

Comments
 (0)