Skip to content

Commit

Permalink
magento#271: [My Account] Attributes validation: parameter missing in…
Browse files Browse the repository at this point in the history
… request fix
  • Loading branch information
furseyev committed Jun 25, 2019
1 parent eb48f44 commit 2eb7c15
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ public function execute(array $customerData, $addRequiredAttributes = false): vo
$errorInput = [];

foreach ($attributes as $attributeInfo) {
if ($attributeInfo->getIsRequired() && $customerData[$attributeInfo->getAttributeCode()] == '') {
if ($attributeInfo->getIsRequired()
&& (!isset($customerData[$attributeInfo->getAttributeCode()])
|| $customerData[$attributeInfo->getAttributeCode()] == '')
) {
$errorInput[] = $attributeInfo->getDefaultFrontendLabel();
}
}
Expand Down

0 comments on commit 2eb7c15

Please sign in to comment.