Skip to content

Commit

Permalink
Merge pull request #126 from spideyfusion/php8-compatibility
Browse files Browse the repository at this point in the history
Fix interaction with the Sockets API under PHP 8.x
  • Loading branch information
fennb authored May 10, 2021
2 parents 405d125 + 8d9b94e commit b7a4171
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.un~
.cache
.cache/*
composer.lock
vendor/
4 changes: 2 additions & 2 deletions lib/Phirehose.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,8 @@ public function consume($reconnect = TRUE)
pcntl_signal_dispatch();
}

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

Expand Down

0 comments on commit b7a4171

Please sign in to comment.