alexandr-mironov / php-smpp

PHP SMPP (v 3.4) client
47 stars 22 forks source link

PHP8 compatibility #6

Closed oc666 closed 2 years ago

oc666 commented 2 years ago

Hello

Socket resource was change on PHP8 and it's class object instead of resource.

Need to change the condition in Socket.php from: if (!is_resource($this->socket)) return false; to: if (!is_resource($this->socket) && !$this->socket instanceof \Socket) return false;

More info can be found here: https://php.watch/versions/8.0/sockets-sockets-addressinfo#sockets-is-resource

alexandr-mironov commented 2 years ago

please use https://github.com/alexandr-mironov/php8-smpp