mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-20 16:57:36 +03:00
Fix RandomNodeProvider: change the max value in mt_rand() call to prevent invalid node generation
This commit is contained in:
@@ -31,6 +31,6 @@ class RandomNodeProvider implements NodeProviderInterface
|
||||
*/
|
||||
public function getNode()
|
||||
{
|
||||
return sprintf('%06x%06x', mt_rand(0, 1 << 24), mt_rand(0, 1 << 24));
|
||||
return sprintf('%06x%06x', mt_rand(0, 0xffffff), mt_rand(0, 0xffffff));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user