Skip to content
Snippets Groups Projects
Commit a1ad80ed authored by Oleksandr Karpenko's avatar Oleksandr Karpenko
Browse files

Merge remote-tracking branch 'origin/MAGETWO-44461' into BUGS

parents fdb061af 1bfd17ee
No related merge requests found
...@@ -377,7 +377,9 @@ class Customer extends AbstractCustomer ...@@ -377,7 +377,9 @@ class Customer extends AbstractCustomer
$attributeParameters = $this->_attributes[$attributeCode]; $attributeParameters = $this->_attributes[$attributeCode];
if ('select' == $attributeParameters['type']) { if ('select' == $attributeParameters['type']) {
$value = $attributeParameters['options'][strtolower($value)]; $value = isset($attributeParameters['options'][strtolower($value)])
? $attributeParameters['options'][strtolower($value)]
: 0;
} elseif ('datetime' == $attributeParameters['type']) { } elseif ('datetime' == $attributeParameters['type']) {
$value = (new \DateTime())->setTimestamp(strtotime($value)); $value = (new \DateTime())->setTimestamp(strtotime($value));
$value = $value->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT); $value = $value->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment