Skip to content

Commit b7a4171

Browse files
authored
Merge pull request #126 from spideyfusion/php8-compatibility
Fix interaction with the Sockets API under PHP 8.x
2 parents 405d125 + 8d9b94e commit b7a4171

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
*.un~
33
.cache
44
.cache/*
5+
composer.lock
6+
vendor/

lib/Phirehose.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,8 @@ public function consume($reconnect = TRUE)
518518
pcntl_signal_dispatch();
519519
}
520520

521-
// Some sort of socket error has occured
522-
$this->lastErrorNo = is_resource($this->conn) ? @socket_last_error($this->conn) : NULL;
521+
// Some sort of socket error has occurred
522+
$this->lastErrorNo = is_resource($this->conn) ? @socket_last_error() : NULL;
523523
$this->lastErrorMsg = ($this->lastErrorNo > 0) ? @socket_strerror($this->lastErrorNo) : 'Socket disconnected';
524524
$this->log('Phirehose connection error occured: ' . $this->lastErrorMsg,'error');
525525

0 commit comments

Comments
 (0)