From 5c989451ab80022412ce72a119d13caaef07c5a2 Mon Sep 17 00:00:00 2001 From: blogdaren Date: Sat, 29 Oct 2022 01:46:12 -0400 Subject: [PATCH] Fix Deprecated:Implicit conversion from xxx float to int loses precision --- Protocols/Ws.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Protocols/Ws.php b/Protocols/Ws.php index 449a419d8..30c5f61ff 100644 --- a/Protocols/Ws.php +++ b/Protocols/Ws.php @@ -237,7 +237,7 @@ public static function encode($payload, ConnectionInterface $connection) $pack = ''; $length = $length_flag = \strlen($payload); if (65535 < $length) { - $pack = \pack('NN', ($length & 0xFFFFFFFF00000000) >> 32, $length & 0x00000000FFFFFFFF); + $pack = \pack('NN', ($length & (int)0xFFFFFFFF00000000) >> 32, $length & (int)0x00000000FFFFFFFF); $length_flag = 127; } else if (125 < $length) { $pack = \pack('n*', $length);