From 88b43cfa143e045b03719bed96f4e4b822ee0e96 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 20 Oct 2022 16:18:55 -0600 Subject: [PATCH] If no handle return false Splitting up the condition and return false for each condition works in all tests. --- resources/classes/event_socket.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/classes/event_socket.php b/resources/classes/event_socket.php index 85743ed30f..82d0305247 100644 --- a/resources/classes/event_socket.php +++ b/resources/classes/event_socket.php @@ -142,7 +142,11 @@ class event_socket { } public function connected() { - if ($this->fp && feof($this->fp) === true) { + if (!$this->fp) { + //not connected to the socket + return false; + } + if (feof($this->fp) === true) { //not connected to the socket return false; }