Browse Source

fixed 64bit ids in result set (fucking php)

git-svn-id: svn://svn.sphinxsearch.com/sphinx/trunk@718 406a0c4d-033a-0410-8de8-e80135713968
shodan 18 năm trước cách đây
mục cha
commit
70f8eb4ec6
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      api/sphinxapi.php

+ 1 - 2
api/sphinxapi.php

@@ -515,9 +515,8 @@ class SphinxClient
 				list ( $doc, $weight ) = array_values ( unpack ( "N*N*",
 					substr ( $response, $p, 8 ) ) );
 				$p += 8;
+				$doc = sprintf ( "%u", $doc ); // workaround for php signed/unsigned braindamage
 			}
-
-			$doc = sprintf ( "%u", $doc ); // workaround for php signed/unsigned braindamage
 			$weight = sprintf ( "%u", $weight );
 
 			$result["matches"][$doc]["weight"] = $weight;