Commit 303d454
committed
fix: replace rand() with random_int() and intdiv() in getTimeoutMicroseconds()
rand() (mt_rand) offers weaker uniformity than random_int(), and passing
$timeout / 10 (float) to rand()'s int parameters triggers a deprecation
warning in PHP 8.1+. Switch to random_int() for better distribution and
use intdiv() to ensure the upper bound is always an integer.1 parent 6f497b5 commit 303d454
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
0 commit comments