mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
functions.inc.php: checkdnsrr may not exist; try and be graceful
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@353 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
parent
40417e9247
commit
0d559f2d57
@ -282,15 +282,15 @@ function check_email ($email)
|
||||
|
||||
// Look for an AAAA, A, or MX record for the domain
|
||||
|
||||
// AAAA (IPv6) is only available in PHP v. >= 5
|
||||
if (version_compare(phpversion(), "5.0.0", ">="))
|
||||
{
|
||||
if (checkdnsrr($domain,'AAAA')) return true;
|
||||
if(function_exists('checkdnsrr')) {
|
||||
// AAAA (IPv6) is only available in PHP v. >= 5
|
||||
if (version_compare(phpversion(), "5.0.0", ">="))
|
||||
{
|
||||
if (checkdnsrr($domain,'AAAA')) return true;
|
||||
}
|
||||
if (checkdnsrr($domain,'A')) return true;
|
||||
if (checkdnsrr($domain,'MX')) return true;
|
||||
}
|
||||
|
||||
if (checkdnsrr($domain,'A')) return true;
|
||||
if (checkdnsrr($domain,'MX')) return true;
|
||||
|
||||
# TODO: different error message for non-existing domains (instead of "email is invalid")
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user