[VarDumper] fix side-effect by not using mt_rand()

This commit is contained in:
Nicolas Grekas 2020-03-17 23:27:36 +01:00
parent 2baa8128ad
commit 8c85f91b9c

View File

@ -48,8 +48,8 @@ class VarCloner extends AbstractCloner
// or null if the original value is used directly
if (!self::$hashMask) {
self::$gid = uniqid(mt_rand(), true); // Unique string used to detect the special $GLOBALS variable
self::initHashMask();
self::$gid = md5(dechex(self::$hashMask)); // Unique string used to detect the special $GLOBALS variable
}
$gid = self::$gid;
$hashMask = self::$hashMask;