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:
parent
598eb4ab31
commit
58d0a1ad8c
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue