8000 [VarDumper] fix side-effect by not using mt_rand() · symfony/symfony@8c85f91 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c85f91

Browse files
[VarDumper] fix side-effect by not using mt_rand()
1 parent 2baa812 commit 8c85f91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/VarDumper/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)
0