Fix PhpiredisSocketConnection for PHP 8.

Removed is_resource() check as socket_create() now returns an object.
This commit is contained in:
Daniele Alessandri
2020-09-20 15:20:18 +02:00
parent f07f8d01fe
commit 0e9aeee90f
+1 -3
View File
@@ -227,9 +227,7 @@ class PhpiredisSocketConnection extends AbstractConnection
$protocol = SOL_TCP;
}
$socket = @socket_create($domain, SOCK_STREAM, $protocol);
if (!is_resource($socket)) {
if (false === $socket = @socket_create($domain, SOCK_STREAM, $protocol)) {
$this->emitSocketError();
}