[BUGFIX] Accept empty input for TCA eval 'email' 33/46533/2
authorMarkus Klein <markus.klein@typo3.org>
Sun, 7 Feb 2016 22:50:17 +0000 (23:50 +0100)
committerBenni Mack <benni@typo3.org>
Mon, 8 Feb 2016 15:00:38 +0000 (16:00 +0100)
An empty string is a valid email address for an input field of
eval type 'email', unless 'required' is specified explicitly.

Resolves: #73101
Releases: master, 7.6
Change-Id: Ia67aba63331194d43f023fea628028b679cde95c
Reviewed-on: https://review.typo3.org/46533
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 1ec3e50..5654700 100644 (file)
@@ -2883,7 +2883,9 @@ class DataHandler
                     }
                     break;
                 case 'email':
-                    $this->checkValue_input_ValidateEmail($value, $set);
+                    if ((string)$value !== '') {
+                        $this->checkValue_input_ValidateEmail($value, $set);
+                    }
                     break;
                 default:
                     if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func])) {