Skip to content

Commit 13c0316

Browse files
[VarDumper] fix side-effect by not using mt_rand()
1 parent 050bed0 commit 13c0316

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
@@ -48,8 +48,8 @@ protected function doClone($var)
4848
// or null if the original value is used directly
4949

5050
if (!self::$hashMask) {
51-
self::$gid = uniqid(mt_rand(), true); // Unique string used to detect the special $GLOBALS variable
5251
self::initHashMask();
52+
self::$gid = md5(dechex(self::$hashMask)); // Unique string used to detect the special $GLOBALS variable
5353
}
5454
$gid = self::$gid;
5555
$hashMask = self::$hashMask;

0 commit comments

Comments
 (0)