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


git-svn-id: https://develop.svn.wordpress.org/trunk@32322 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2015-04-29 03:16:06 +00:00
parent af0315de16
commit 342989657f

View File

@ -146,7 +146,7 @@ function wp_tempnam( $filename = '', $dir = '' ) {
$dir = get_temp_dir();
}
if ( empty( $filename ) || '.' == $filename ) {
if ( empty( $filename ) || '.' == $filename || '/' == $filename ) {
$filename = time();
}