Skip to content

Commit ffb015a

Browse files
fix:phpunit
1 parent 485b3c6 commit ffb015a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

inc/files.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ function ppom_create_thumb_for_meta( $file_name, $product_id, $cropped = false,
142142
* @return string The new file name.
143143
*/
144144
function ppom_create_unique_file_name( $file_name, $file_ext ) {
145-
return $file_name . "." . base64_encode( substr( wp_hash_password( $file_name ), 0, 16 ) ) . "." . $file_ext;
145+
$seed = $file_name . microtime( true ) . mt_rand();
146+
return $file_name . "." . wp_hash( $seed ) . "." . $file_ext;
146147
}
147148

148149
final class UploadFileErrors {

0 commit comments

Comments
 (0)