Closed Pascal76 closed 2 years ago
Im just starting to upgrade to PHP 8.1 and found this warning too. The solution is pretty easy. On line 132 of Socket.php change to
if (!empty($this->local_host) && strlen($this->local_host) > 0) {
Stupid quickfix:
$this->resolver = new \Net_DNS2_Resolver();
// Workaround for strlen() null
// https://github.com/mikepultz/netdns2/blob/master/Net/DNS2/Socket.php#L132
$this->resolver->local_host = "0";
Recognized the same. Merging this would be great.
php 7.4 EOL is coming very soon (in less than 20 days). Lot of people will move to php 8.1 It would be great to finalize the compatibility.
@mikepultz Can you please merge that (see discussion)? Otherwise some people might have to do a fork, although the quickfix works it is not the best solution.
thank you for the new build !!!
=)
Hello,
Would you have time to make the code compatible with php 8.1 ? ex: Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /apache_sites/jbm/lib_8.1/vendor/pear/net_dns2/Net/DNS2/Socket.php on line 132