Ignore:
Timestamp:
May 20, 2006 2:12:12 AM (18 years ago)
Author:
scdev
Message:

Q - making codebase 2 work with php5. Rewrote ImageThumb? class to work with GD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FormValidator.inc.php

    r106 r119  
    417417
    418418        // Check domain exists: It's a domain if ip2long fails; Checkdnsrr ensures a MX record exists; Gethostbyname() ensures the domain exists.
    419         if (ip2long($domain) == '-1' && function_exists('checkdnsrr') && !checkdnsrr($domain . '.', 'MX') && gethostbyname($domain) == $domain) {
     419        // Compare ip2long twice for php4 backwards compat.
     420        if ((ip2long($domain) == '-1' || ip2long($domain) === false) && function_exists('checkdnsrr') && !checkdnsrr($domain . '.', 'MX') && gethostbyname($domain) == $domain) {
    420421            $this->addError($form_name, sprintf(_("<strong>%s</strong> is not a valid email domain name"), oTxt($domain)));
    421422            App::logMsg(sprintf('The email address %s contains an invalid email domain name (%s).', getFormData($form_name), $domain), LOG_INFO, __FILE__, __LINE__);
Note: See TracChangeset for help on using the changeset viewer.