Changeset 40075
- Timestamp:
- 02/17/2017 09:23:52 PM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/src/wp-includes/functions.php
r39851 r40075 2075 2075 // Check for both lower and upper case extension or image sub-sizes may be overwritten. 2076 2076 while ( file_exists($dir . "/$filename") || file_exists($dir . "/$filename2") ) { 2077 $new_number = $number + 1;2077 $new_number = (int) $number + 1; 2078 2078 $filename = str_replace( array( "-$number$ext", "$number$ext" ), "-$new_number$ext", $filename ); 2079 2079 $filename2 = str_replace( array( "-$number$ext2", "$number$ext2" ), "-$new_number$ext2", $filename2 ); … … 2095 2095 2096 2096 while ( file_exists( $dir . "/$filename" ) ) { 2097 $new_number = (int) $number + 1; 2097 2098 if ( '' == "$number$ext" ) { 2098 $filename = "$filename-" . ++$number;2099 $filename = "$filename-" . $new_number; 2099 2100 } else { 2100 $filename = str_replace( array( "-$number$ext", "$number$ext" ), "-" . ++$number . $ext, $filename );2101 $filename = str_replace( array( "-$number$ext", "$number$ext" ), "-" . $new_number . $ext, $filename ); 2101 2102 } 2103 $number = $new_number; 2102 2104 } 2103 2105 }
Note: See TracChangeset
for help on using the changeset viewer.