瀏覽代碼

fix PHP7 bitwise operation warning: A non-numeric value encountered

moon 8 年之前
父節點
當前提交
192f2cd275
共有 1 個文件被更改,包括 1 次插入1 次删除
  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) {