merged branch lyrixx/email-validator-php533 (PR #8712)
This PR was merged into the master branch.
Discussion
----------
[Validator] Removed unnecessary check as symfony requires php >= 5.3.3.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | I guess
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
cf31dfb
[Validator] Removed unnecessary check as symfony require php >= 5.3.3.
This commit is contained in:
commit
0121699fa4
@ -41,11 +41,6 @@ class EmailValidator extends ConstraintValidator
|
||||
if ($valid) {
|
||||
$host = substr($value, strpos($value, '@') + 1);
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.3.3', '<') && strpos($host, '.') === false) {
|
||||
// Likely not a FQDN, bug in PHP FILTER_VALIDATE_EMAIL prior to PHP 5.3.3
|
||||
$valid = false;
|
||||
}
|
||||
|
||||
// Check for host DNS resource records
|
||||
if ($valid && $constraint->checkMX) {
|
||||
$valid = $this->checkMX($host);
|
||||
|
Reference in New Issue
Block a user