Skip to content

Commit 6260a36

Browse files
author
Oleksii Korshenko
authored
Merge pull request #1754 from magento-engcom/2.2-develop-prs
Public Pull Requests #12120 Update AbstractBackend.php by @hewersonfreitas #12154 Add link to issue gates wiki page in the labels section of the readme by @dmanners
2 parents d02fd62 + 01fab5a commit 6260a36

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ To suggest documentation improvements, click [here][4].
3838
| ![reject](http://devdocs.magento.com/common/images/github_reject.png) | The pull request has been rejected and will not be merged into mainline code. Possible reasons can include but are not limited to: issue has already been fixed in another code contribution, or there is an issue with the code contribution. |
3939
| ![bug report](http://devdocs.magento.com/common/images/github_bug.png) | The Magento Team has confirmed that this issue contains the minimum required information to reproduce. |
4040
| ![acknowledged](http://devdocs.magento.com/common/images/gitHub_acknowledged.png) | The Magento Team has validated the issue and an internal ticket has been created. |
41-
| ![acknowledged](http://devdocs.magento.com/common/images/github_inProgress.png) | The internal ticket is currently in progress, fix is scheduled to be delivered. |
42-
| ![acknowledged](http://devdocs.magento.com/common/images/github_needsUpdate.png) | The Magento Team needs additional information from the reporter to properly prioritize and process the issue or pull request. |
41+
| ![in progress](http://devdocs.magento.com/common/images/github_inProgress.png) | The internal ticket is currently in progress, fix is scheduled to be delivered. |
42+
| ![needs update](http://devdocs.magento.com/common/images/github_needsUpdate.png) | The Magento Team needs additional information from the reporter to properly prioritize and process the issue or pull request. |
43+
44+
To learn more about issue gate labels click [here](https://github.com/magento/magento2/wiki/Magento-Issue-Gates)
4345

4446
<h2>Reporting security issues</h2>
4547

app/code/Magento/Eav/Model/Entity/Attribute/Backend/AbstractBackend.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ public function validate($object)
237237
&& $attribute->isValueEmpty($value)
238238
&& $attribute->isValueEmpty($attribute->getDefaultValue())
239239
) {
240-
throw new LocalizedException(__('The value of attribute "%1" must be set', $attrCode));
240+
$label = $attribute->getFrontend()->getLabel();
241+
throw new LocalizedException(__('The value of attribute "%1" must be set', $label));
241242
}
242243

243244
if ($attribute->getIsUnique()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,8 @@ public function testValidateCustomerData()
579579
$validationResponse = $this->_webApiCall($serviceInfo, $requestData);
580580
$this->assertFalse($validationResponse['valid']);
581581

582-
$this->assertEquals('The value of attribute "firstname" must be set', $validationResponse['messages'][0]);
583-
$this->assertEquals('The value of attribute "lastname" must be set', $validationResponse['messages'][1]);
582+
$this->assertEquals('The value of attribute "First Name" must be set', $validationResponse['messages'][0]);
583+
$this->assertEquals('The value of attribute "Last Name" must be set', $validationResponse['messages'][1]);
584584
}
585585

586586
public function testIsReadonly()

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public function testSaveActionCategoryWithDangerRequest()
339339
);
340340
$this->dispatch('backend/catalog/category/save');
341341
$this->assertSessionMessages(
342-
$this->equalTo(['The value of attribute "name" must be set']),
342+
$this->equalTo(['The value of attribute "Name" must be set']),
343343
\Magento\Framework\Message\MessageInterface::TYPE_ERROR
344344
);
345345
}

0 commit comments

Comments
 (0)