e107inc/e107

View on GitHub
e107_handlers/mail_validation_class.php

Summary

Maintainability
A
1 hr
Test Coverage
F
0%

Consider simplifying this complex logical expression.
Open

                if($this->VerifyResultLines($connection,"220")>0
                && $this->PutLine($connection,"HELO $localhost")
                && $this->VerifyResultLines($connection,"250")>0
                && $this->PutLine($connection,"MAIL FROM: <$localuser@$localhost>")
                && $this->VerifyResultLines($connection,"250")>0
Severity: Major
Found in e107_handlers/mail_validation_class.php - About 1 hr to fix

    Argument 2 (str2) is ?string but \strcmp() takes string
    Open

                && !strcmp(@gethostbyname($this->exclude_address),$ip))

    Argument 1 (hostname) is null but \gethostbyname() takes string
    Open

                    if(!strcmp($ip=@gethostbyname($domain),$domain))

    Argument 1 (hostname) is ?string but \fsockopen() takes string
    Open

                if(($connection=($this->timeout ? @fsockopen($ip,25,$errno,$error,$this->timeout) : @fsockopen($ip,25))))

    Argument 2 (subject) is null but \preg_match() takes string
    Open

                if(preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/',$domain))

    Suspicious type null of a variable or expression used to build a string. (Expected type to be able to cast to a string)
    Open

                            $this->OutputDebug("Could not resolve host name \"".$hosts[$host]."\".");

    When appending to a value of type array{}, found an array access index of type null, but expected the index to be of type int|string
    Open

                    $mxhosts[$weights[$host]]=$hosts[$host];

    Suspicious type null of a variable or expression used to build a string. (Expected type to be able to cast to a string)
    Open

                        $this->OutputDebug("Host address of \"".$hosts[$host]."\" is the exclude address");

    Argument 2 (str2) is null but \strcmp() takes string
    Open

                    if(!strcmp($ip=@gethostbyname($domain),$domain))

    Invalid offset 0 of array type array{}
    Open

                    $mxhosts[$weights[$host]]=$hosts[$host];

    Suspicious type null of a variable or expression used to build a string. (Expected type to be able to cast to a string)
    Open

                        $this->OutputDebug("Resolving host name \"".$hosts[$host]."\"...");

    There are no issues that match your filters.

    Category
    Status