From a74f87570ca6afe684ba6495ec801c29ede1b38d Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sat, 19 Dec 2009 12:23:45 -0700 Subject: [PATCH] Improvements to random ID generation --- framework/Mime/lib/Horde/Mime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/Mime/lib/Horde/Mime.php b/framework/Mime/lib/Horde/Mime.php index 211a2294d..fa7923929 100644 --- a/framework/Mime/lib/Horde/Mime.php +++ b/framework/Mime/lib/Horde/Mime.php @@ -591,7 +591,7 @@ class Horde_Mime */ static public function generateRandomId($length = 24) { - return substr(base_convert(dechex(strtr(microtime(), array('0.' => '', ' ' => ''))) . uniqid(mt_rand(), true), 16, 36), $length); + return substr(base_convert(dechex(strtr(microtime(), array('0.' => '', ' ' => ''))) . strtr(uniqid(mt_rand(), true), array('.' => '')), 16, 36), 0, $length); } /** -- 2.11.0