mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge branch '1.3-misc' of github.com:cakephp/cakephp1x into 1.3-misc
This commit is contained in:
commit
cf697535b7
1 changed files with 7 additions and 2 deletions
|
@ -501,8 +501,13 @@ class Validation extends Object {
|
|||
}
|
||||
|
||||
if ($return === true && preg_match('/@(' . $_this->__pattern['hostname'] . ')$/i', $_this->check, $regs)) {
|
||||
$host = gethostbynamel($regs[1]);
|
||||
return is_array($host);
|
||||
if (function_exists('getmxrr')) {
|
||||
return getmxrr($regs[1], $mxhosts);
|
||||
}
|
||||
if (function_exists('checkdnsrr')) {
|
||||
return checkdnsrr($regs[1], 'MX');
|
||||
}
|
||||
return is_array(gethostbynamel($regs[1]));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue