WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 2 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:

Description

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)

comment:1 @dd322 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:

wp-includes/functions.php
1477:		return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp');
1479:		return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' );

wp-includes/pluggable.php
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.