Skip to content

Commit a353e40

Browse files
committed
ACP2E-3791: [Cloud] Delete operation is forbidden for current area error during customer account creation
1 parent 3959e2e commit a353e40

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/code/Magento/Customer/Model/AccountManagement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,8 +939,8 @@ public function createAccountWithPasswordHash(CustomerInterface $customer, $hash
939939
}
940940
if (!$addressValidator->isValid($addressModel)) {
941941
$exception = new InputException();
942-
$messages = array_merge(...array_values($addressValidator->getMessages()));
943-
array_walk($messages, [$exception, 'addError']);
942+
$messages = $addressValidator->getMessages();
943+
array_walk_recursive($messages, [$exception, 'addError']);
944944
throw $exception;
945945
}
946946
}

dev/tests/api-functional/testsuite/Magento/Customer/Api/CustomerRepositoryTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2015 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -654,8 +654,8 @@ public function testCreateCustomerWithoutAddressRequiresException(): void
654654
$this->assertEquals(HTTPExceptionCodes::HTTP_BAD_REQUEST, $e->getCode());
655655
$exceptionData = $this->processRestExceptionResult($e);
656656
$expectedExceptionData = [
657-
'message' => '"%fieldName" is required. Enter and try again.',
658-
'parameters' => ['fieldName' => Address::FIRSTNAME],
657+
'message' => '"%1" is a required value.',
658+
'parameters' => ['0' => 'First Name'],
659659
];
660660
$this->assertEquals($expectedExceptionData, $exceptionData);
661661
}

0 commit comments

Comments
 (0)