Make sure resource exists before using feof

This code changes prevents this error.

Warning: feof() expects parameter 1 to be resource, bool given
This commit is contained in:
FusionPBX 2022-10-13 11:26:53 -06:00 committed by GitHub
parent 598eb4ab31
commit 58d0a1ad8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ class event_socket {
} }
public function connected() { public function connected() {
if (feof($this->fp) === true) { if ($this->fp && feof($this->fp) === true) {
//not connected to the socket //not connected to the socket
return false; return false;
} }