Skip to content

Commit b91b2a9

Browse files
author
Sergey Shvets
committed
MAGETWO-56964: [Backport] [GitHub] Validate attribute values #4881
fixed CR comments
1 parent 156c2d8 commit b91b2a9

File tree

1 file changed

+1
-3
lines changed
  • app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute

1 file changed

+1
-3
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Validate.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,12 @@ private function setMessageToResponse($response, $messages)
149149
/**
150150
* @param DataObject $response
151151
* @param array|null $options
152-
* @return $this
153152
*/
154153
private function checkUniqueOption(DataObject $response, array $options = null)
155154
{
156-
if (is_array($options) and !$this->isUniqueAdminValues($options['value'], $options['delete'])) {
155+
if (is_array($options) && !$this->isUniqueAdminValues($options['value'], $options['delete'])) {
157156
$this->setMessageToResponse($response, [__('The value of Admin must be unique.')]);
158157
$response->setError(true);
159158
}
160-
return $this;
161159
}
162160
}

0 commit comments

Comments
 (0)