Skip to content

Commit

Permalink
MAGETWO-84016: Fixed 'Non-numeric value' warning on account create/sa…
Browse files Browse the repository at this point in the history
…ve when DOB field is visible #12302
  • Loading branch information
Oleksii Korshenko authored Nov 21, 2017
2 parents 513e9f5 + dfefe0b commit f6cfea4
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 f6cfea4

Please sign in to comment.