Skip to content

Commit

Permalink
Merge pull request #1739 from magento-engcom/2.2-develop-prs
Browse files Browse the repository at this point in the history
Public Pull Requests

#12302 Fixed 'Non-numeric value' warning on account create/save when DOB field is visible by @vovayatsyuk

Fixed Public Issues

#12146 Customer with empty "Date of Birth" cannot be saved
  • Loading branch information
Oleksii Korshenko authored Nov 21, 2017
2 parents 513e9f5 + f6cfea4 commit 6bce6f7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/internal/Magento/Framework/Data/Form/Filter/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public function __construct(
*/
public function inputFilter($value)
{
if (!$value) {
return $value;
}

$filterInput = new \Zend_Filter_LocalizedToNormalized(
['date_format' => $this->_dateFormat, 'locale' => $this->localeResolver->getLocale()]
);
Expand All @@ -74,6 +78,10 @@ public function inputFilter($value)
*/
public function outputFilter($value)
{
if (!$value) {
return $value;
}

$filterInput = new \Zend_Filter_LocalizedToNormalized(
['date_format' => DateTime::DATE_INTERNAL_FORMAT, 'locale' => $this->localeResolver->getLocale()]
);
Expand Down

0 comments on commit 6bce6f7

Please sign in to comment.