Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8c85f91

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

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/VarDumper/Cloner/VarCloner.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Cloner/VarCloner.php
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.