From 1b2819ca294bfa943fd90c7d922c5cef5f8cd8e4 Mon Sep 17 00:00:00 2001 From: Victor Emanouilov Date: Thu, 29 Aug 2024 09:32:48 +0300 Subject: [PATCH] fix endless loop error while reading an empty line from the server --- src/ManageSieve/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ManageSieve/Client.php b/src/ManageSieve/Client.php index 236fc17..b755520 100644 --- a/src/ManageSieve/Client.php +++ b/src/ManageSieve/Client.php @@ -91,7 +91,7 @@ private function readLine() { try { $nval = \fread($this->sock, $this->readSize); - if ($nval === false) { + if ($nval === false || $nval === "") { break; } $this->readBuffer .= $nval;