mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
Improve temp file name, props DD32, fixes #10224
git-svn-id: http://svn.automattic.com/wordpress/trunk@11712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b86edde092
commit
7842ab84d9
@ -171,6 +171,7 @@ function wp_tempnam($filename = '', $dir = ''){
|
||||
if ( empty($filename) )
|
||||
$filename = time();
|
||||
|
||||
$filename = preg_replace('|\..*$|', '.tmp', $filename);
|
||||
$filename = $dir . wp_unique_filename($dir, $filename);
|
||||
touch($filename);
|
||||
return $filename;
|
||||
|
Loading…
Reference in New Issue
Block a user