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

Compatibility with PHP 8 #13

Closed
p5yk0 opened this issue Jan 3, 2023 · 1 comment
Closed

Compatibility with PHP 8 #13

p5yk0 opened this issue Jan 3, 2023 · 1 comment

Comments

@p5yk0
Copy link

p5yk0 commented Jan 3, 2023

Since PHP 8, sockets are not considered as resources anymore but object.

In Socket.php

if (!is_resource($this->socket)) {
   return false;
}

should become

if (!(is_resource($this->socket) || $this->socket instanceof \Socket)) {
   return false;
}

see https://php.watch/versions/8.0/sockets-sockets-addressinfo

@p5yk0
Copy link
Author

p5yk0 commented Jan 3, 2023

I've just noticed that it'is a duplicate of issue #11.

@p5yk0 p5yk0 closed this as completed Jan 3, 2023
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