Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Conversation

@MatyCZ
Copy link

@MatyCZ MatyCZ commented Aug 13, 2015

If you upload more files in 1s on Windows, uniqid will be the same.

@weierophinney
Copy link
Member

Before we can review this:

  • Please provide unit tests for the functionality.
  • Existing tests break because of the changes. They will either need to be updated, or the functionality introduced reviewed to ensure no breakage occurs.

Additionally, can you point to a bug report on the PHP bug tracker that indicates this behavior? I've used uniqid() for years, and never seen it generate the same hash within the same second; how many files are we talking about?

@Ocramius
Copy link
Member

Ocramius commented Feb 4, 2016

@weierophinney can't remember why I was even using windows, but yeah, uniqid() is not unique on windows (within the same millisecond) :-(

weierophinney added a commit that referenced this pull request May 17, 2017
- `uniqid()` will return 23 characters with the changes from #3, as it
  adds a boolean `true` for the `more_entropy` flag.
weierophinney added a commit that referenced this pull request May 17, 2017
Forward port #3
Forward port #29
Forward port #39
Forward port #42
Forward port #47
Forward port #53
Forward port #54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants