Changeset 768 for trunk/lib/Validator.inc.php
- Timestamp:
- Jun 9, 2022 7:24:04 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Validator.inc.php
r767 r768 348 348 } 349 349 350 if ($strict) { 351 // Strict tests. 352 if (ip2long($domain) === false && function_exists('checkdnsrr') && !checkdnsrr($domain . '.', 'MX') && gethostbyname($domain) == $domain) { 353 // Check domain exists: It's a domain if ip2long fails; checkdnsrr ensures a MX record exists; gethostbyname() ensures the domain exists. 354 $app->logMsg(sprintf('%s (line %s) failed: %s', __METHOD__, __LINE__, getDump($val)), $type, $file, $line); 355 return self::EMAIL_MX_FAIL; 356 } 350 if ($strict && getmxrr('checkdnsrr') && !getmxrr($domain)) { 351 // Strict tests: check if MX record exists. 352 $app->logMsg(sprintf('%s (line %s) failed: %s', __METHOD__, __LINE__, getDump($val)), $type, $file, $line); 353 return self::EMAIL_MX_FAIL; 357 354 } 358 355
Note: See TracChangeset
for help on using the changeset viewer.