fix: use explode instead of split

This commit is contained in:
Emmanuel BENOîT 2025-01-05 19:01:06 +01:00
parent 9a571832f5
commit da760ee4a3
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg
2 changed files with 4 additions and 4 deletions
includes/form

View file

@ -114,7 +114,7 @@ class Validator_Email
public function validate( $value )
{
if ( preg_match( "/^[a-zA-Z0-9\._-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/" , $value ) ) {
list( $username , $domain ) = split( '@' , $value );
list( $username , $domain ) = explode( '@' , $value );
if ( checkdnsrr( $domain , 'MX' ) ) {
return null;
}