浏览代码

Obsolete code because crc32() does exist in our minimum php requirements.

Thijs Kinkhorst 22 年之前
父节点
当前提交
88a42368fc
共有 1 个文件被更改,包括 0 次插入17 次删除
  1. 0 17
      functions/strings.php

+ 0 - 17
functions/strings.php

@@ -284,24 +284,7 @@ function sq_mt_seed($Val) {
     $Max = mt_getrandmax();
     
     if (! is_int($Val)) {
-        if (function_exists('crc32')) {
             $Val = crc32($Val);
-        } else {
-            $Str = $Val;
-            $Pos = 0;
-            $Val = 0;
-            $Mask = $Max / 2;
-            $HighBit = $Max ^ $Mask;
-            while ($Pos < strlen($Str)) {
-                if ($Val & $HighBit) {
-                    $Val = (($Val & $Mask) << 1) + 1;
-                } else {
-                    $Val = ($Val & $Mask) << 1;
-                }
-                $Val ^= $Str[$Pos];
-                $Pos ++;
-            }
-        }
     }
     
     if ($Val < 0) {