Skip to content

Commit 4801d74

Browse files
vovayatsyukrostyslav-hymon
authored andcommitted
Fix errors when DOB field is visible. #12146
- Fix customer create page rendering - Fix customer save in backend and frontend
1 parent d7352dd commit 4801d74

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)