Skip to content

Commit 6bce6f7

Browse files
author
Oleksii Korshenko
authored
Merge pull request #1739 from magento-engcom/2.2-develop-prs
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
2 parents 513e9f5 + f6cfea4 commit 6bce6f7

File tree

1 file changed

+8
-0
lines changed
  • lib/internal/Magento/Framework/Data/Form/Filter

1 file changed

+8
-0
lines changed

lib/internal/Magento/Framework/Data/Form/Filter/Date.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ public function __construct(
5454
*/
5555
public function inputFilter($value)
5656
{
57+
if (!$value) {
58+
return $value;
59+
}
60+
5761
$filterInput = new \Zend_Filter_LocalizedToNormalized(
5862
['date_format' => $this->_dateFormat, 'locale' => $this->localeResolver->getLocale()]
5963
);
@@ -74,6 +78,10 @@ public function inputFilter($value)
7478
*/
7579
public function outputFilter($value)
7680
{
81+
if (!$value) {
82+
return $value;
83+
}
84+
7785
$filterInput = new \Zend_Filter_LocalizedToNormalized(
7886
['date_format' => DateTime::DATE_INTERNAL_FORMAT, 'locale' => $this->localeResolver->getLocale()]
7987
);

0 commit comments

Comments
 (0)