Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning PHP 8.2 #150

Open
Blackbam opened this issue Aug 8, 2024 · 0 comments
Open

Deprecation warning PHP 8.2 #150

Blackbam opened this issue Aug 8, 2024 · 0 comments

Comments

@Blackbam
Copy link

Blackbam commented Aug 8, 2024

Having a deprecation warning in PHP 8.2:

_Deprecated: Exception::_construct(): Passing null to parameter #1 ($message) of type string is deprecated

/app/Services/DNS/AuthoritativeDnsResolver.php in App\Services\DNS\AuthoritativeDnsResolver::actualLookup at line 82:

            try {
                $redisResult = $this->redis->get(self::getNsRedisKey($lookupDomain));
                if ($redisResult !== null) {
                    $cachedAuthoritativeARecords = explode(',', $redisResult);
                    return $this->recurseNs($domain, $type, $cachedAuthoritativeARecords, 1); // here
                }
            } catch (Exception $e) {
                throw new DnsResolverException($e->getMessage(), $e->getCode(), $e);
            }
        }

/app/Services/DNS/AuthoritativeDnsResolver.php in App\Services\DNS\AuthoritativeDnsResolver::recurseNs at line 125:

        /** @var ?Net_DNS2_Packet_Response $result */
        $result = null;
        foreach ($nameserverIps as $nameserverIp) {
            $dnsClient = $this->clientFactory->customClient([$nameserverIp], self::EXTERNAL_NAMESERVER_TIMEOUT_SEC, false);
            try {
                $result = $dnsClient->query($domain, $type->value); // here
                if (count($result->answer) > 0) {
                    return $result->answer;
                }
                break;
            } catch (Net_DNS2_Exception) {

/vendor/pear/net_dns2/Net/DNS2/Exception.php in Net_DNS2_Exception::__construct at line 64:

        //
        //      https://code.google.com/p/netdns2/issues/detail?id=25
        //
        if (version_compare(PHP_VERSION, '5.3.0', '>=') == true) {
            parent::__construct($message, $code, $previous); // here
        } else {
            parent::__construct($message, $code);
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant