SF.net SVN: postfixadmin: [353] trunk/functions.inc.php
Brought to you by:
christian_boltz,
gingerdog
|
From: <Gin...@us...> - 2008-04-26 22:02:46
|
Revision: 353
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=353&view=rev
Author: GingerDog
Date: 2008-04-26 15:02:49 -0700 (Sat, 26 Apr 2008)
Log Message:
-----------
functions.inc.php: checkdnsrr may not exist; try and be graceful
Modified Paths:
--------------
trunk/functions.inc.php
Modified: trunk/functions.inc.php
===================================================================
--- trunk/functions.inc.php 2008-04-26 21:56:02 UTC (rev 352)
+++ trunk/functions.inc.php 2008-04-26 22:02:49 UTC (rev 353)
@@ -282,15 +282,15 @@
// 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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|