Use str_replace() instead of strtr()
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 11 Aug 2010 07:44:47 +0000 (01:44 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 11 Aug 2010 07:44:47 +0000 (01:44 -0600)
framework/Support/lib/Horde/Support/Randomid.php

index 4ca6492..f3db796 100644 (file)
@@ -48,7 +48,7 @@ class Horde_Support_Randomid
     {
         /* Base64 can have /, +, and = characters.  Restrict to just
          * numbers and letters. */
-        $this->_rid = str_replace(array('/', '+', '='), 0, base64_encode(pack('H*', mt_rand() . strtr(uniqid('', true), '.', '') . dechex(getmypid()))));
+        $this->_rid = str_replace(array('/', '+', '='), 0, base64_encode(pack('H*', mt_rand() . str_replace('.', '', uniqid('', true)) . dechex(getmypid()))));
     }
 
     /**