Skip to content

Commit 6dae469

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: [VarDumper] fix side-effect by not using mt_rand()
2 parents 2c22d29 + 13c0316 commit 6dae469

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Cloner/VarCloner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function doClone($var)
4646
// or null if the original value is used directly
4747

4848
if (!$gid = self::$gid) {
49-
$gid = self::$gid = uniqid(mt_rand(), true); // Unique string used to detect the special $GLOBALS variable
49+
$gid = self::$gid = md5(random_bytes(6)); // Unique string used to detect the special $GLOBALS variable
5050
}
5151
$arrayStub = new Stub();
5252
$arrayStub->type = Stub::TYPE_ARRAY;

0 commit comments

Comments
 (0)