From 37826f938eb8402ef84f0231f5f314e8d37c1ce6 Mon Sep 17 00:00:00 2001 From: rafelangelo Date: Fri, 14 Aug 2020 15:58:43 +0200 Subject: [PATCH 1/2] Update SocketRelay.php Fix type error on empty body results --- src/SocketRelay.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SocketRelay.php b/src/SocketRelay.php index fe0c6f3..0651aa0 100644 --- a/src/SocketRelay.php +++ b/src/SocketRelay.php @@ -208,7 +208,7 @@ public function receiveSync(?int &$flags = null): ?string } } - return $result ?: null; + return ($result !== '') ? $result : null; } /** From 7b4a771c6d2158942e75cc0aa32f653c12c7891e Mon Sep 17 00:00:00 2001 From: rafelangelo Date: Fri, 14 Aug 2020 16:00:35 +0200 Subject: [PATCH 2/2] Update StreamRelay.php Fix type error on empty body results --- src/StreamRelay.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StreamRelay.php b/src/StreamRelay.php index a702603..e0ec707 100644 --- a/src/StreamRelay.php +++ b/src/StreamRelay.php @@ -134,7 +134,7 @@ public function receiveSync(?int &$flags = null): ?string } } - return $result ?: null; + return ($result !== '') ? $result : null; } /**