Skip to content

Commit

Permalink
Forced $key to be string
Browse files Browse the repository at this point in the history
  • Loading branch information
lastguest committed Aug 24, 2015
1 parent 336815f commit 9c3e2e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions murmurhash3.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

function murmurhash3_int($key,$seed=0){
$key = (string) $key;
$klen = strlen($key);
$h1 = $seed;
for ($i=0,$bytes=$klen-($remainder=$klen&3) ; $i<$bytes ; ) {
Expand Down

0 comments on commit 9c3e2e4

Please sign in to comment.