Skip to content

Commit 179ca3f

Browse files
committed
Standard: fix compatibility for uniqid().
1 parent df4c18f commit 179ca3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/uniqid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ PHP_FUNCTION(uniqid)
7777
if (php_random_bytes_silent(&bytes, sizeof(uint32_t)) == FAILURE) {
7878
seed = php_combined_lcg() * 10;
7979
} else {
80-
seed = 1.0 / ((double) UINT32_MAX / bytes);
80+
seed = (10.0 / ((double) UINT32_MAX / bytes));
8181
}
8282
uniqid = strpprintf(0, "%s%08x%05x%.8F", prefix, sec, usec, seed);
8383
} else {

0 commit comments

Comments
 (0)