From 8c85f91b9c3af7670bfa049f49fe62771b22e210 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 17 Mar 2020 23:27:36 +0100 Subject: [PATCH] [VarDumper] fix side-effect by not using mt_rand() --- src/Symfony/Component/VarDumper/Cloner/VarCloner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php index ab44a8d76b..07e6b4ca2e 100644 --- a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php @@ -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;