When creating a temporary file treat the `/` directory properly, to prevent it ending up in an endless self-calling loop.
Props hnle, taka2. Fixes #32135. See #31811 Merges [32322] to the 4.2 branch. Built from https://develop.svn.wordpress.org/branches/4.2@32324 git-svn-id: http://core.svn.wordpress.org/branches/4.2@32295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a3a76fe665
commit
4202e36193
|
@ -146,7 +146,7 @@ function wp_tempnam( $filename = '', $dir = '' ) {
|
|||
$dir = get_temp_dir();
|
||||
}
|
||||
|
||||
if ( empty( $filename ) || '.' == $filename ) {
|
||||
if ( empty( $filename ) || '.' == $filename || '/' == $filename ) {
|
||||
$filename = time();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue