Changeset 40039
- Timestamp:
- 02/03/2017 08:57:38 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r40030 r40039 2064 2064 // Check for both lower and upper case extension or image sub-sizes may be overwritten. 2065 2065 while ( file_exists($dir . "/$filename") || file_exists($dir . "/$filename2") ) { 2066 $new_number = $number + 1;2066 $new_number = (int) $number + 1; 2067 2067 $filename = str_replace( array( "-$number$ext", "$number$ext" ), "-$new_number$ext", $filename ); 2068 2068 $filename2 = str_replace( array( "-$number$ext2", "$number$ext2" ), "-$new_number$ext2", $filename2 ); … … 2084 2084 2085 2085 while ( file_exists( $dir . "/$filename" ) ) { 2086 $new_number = (int) $number + 1; 2086 2087 if ( '' == "$number$ext" ) { 2087 $filename = "$filename-" . ++$number;2088 $filename = "$filename-" . $new_number; 2088 2089 } else { 2089 $filename = str_replace( array( "-$number$ext", "$number$ext" ), "-" . ++$number . $ext, $filename );2090 $filename = str_replace( array( "-$number$ext", "$number$ext" ), "-" . $new_number . $ext, $filename ); 2090 2091 } 2092 $number = $new_number; 2091 2093 } 2092 2094 }
Note: See TracChangeset
for help on using the changeset viewer.