Make WordPress Core

Opened 11 years ago

Closed 8 years ago

#16755 closed enhancement (worksforme)

PHP5-port - uniqid()

Reported by: hakre Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: General Keywords:
Focuses: Cc:


uniqid() does not need a prefix (any longer).

Places in use can be checked if they need to have it passed or not.

Related: #16753

Change History (1)

#1 @dd32
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

The only locations within core (and not within a external library) where we're using uniqid() are the following:

1477:		return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp');
1479:		return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' );

1527:		$rnd_value = md5( uniqid(microtime() . mt_rand(), true ) . $seed );

In neither of these uses is using $prefix exactly bad, or causes any issues.

Closing, as there's no need to update this code, it works, and it's not buggy.

Note: See TracTickets for help on using tickets.