mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-22 19:06:37 +00:00
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:
@@ -142,7 +142,7 @@ class event_socket {
|
||||
}
|
||||
|
||||
public function connected() {
|
||||
if (feof($this->fp) === true) {
|
||||
if ($this->fp && feof($this->fp) === true) {
|
||||
//not connected to the socket
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user