[Validator] Removed PHP <5.3.3 specific code which is not officially supported.
This commit is contained in:
parent
2637e5555c
commit
f10c9748e3
@ -41,11 +41,6 @@ class EmailValidator extends ConstraintValidator
|
|||||||
if ($valid) {
|
if ($valid) {
|
||||||
$host = substr($value, strpos($value, '@') + 1);
|
$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
|
// Check for host DNS resource records
|
||||||
if ($valid && $constraint->checkMX) {
|
if ($valid && $constraint->checkMX) {
|
||||||
$valid = $this->checkMX($host);
|
$valid = $this->checkMX($host);
|
||||||
|
Reference in New Issue
Block a user