Explorar el Código

Merge pull request #180 from Mooooooon/master

fix PHP7 bitwise operation warning: A non-numeric value encountered
walkor hace 8 años
padre
commit
c58763ac45
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Protocols/Ws.php

+ 1 - 1
Protocols/Ws.php

@@ -289,7 +289,7 @@ class Ws
      */
     public static function decode($bytes, $connection)
     {
-        $masked = $bytes[1] >> 7;
+        $masked = ord($bytes[1]) >> 7;
         $data_length = $masked ? ord($bytes[1]) & 127 : ord($bytes[1]);
         $decoded_data = '';
         if ($masked === true) {