Skip to content

Commit

Permalink
Merge pull request #354 from Yoast/JRF/qa-use-wp-native-functions
Browse files Browse the repository at this point in the history
CS/QA: use WP alternative for some native PHP functions
  • Loading branch information
jrfnl authored Dec 16, 2023
2 parents 857bc52 + 14433b2 commit 10d6aff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ function duplicate_post_copy_attachments( $new_id, $post ) {
$new_attachment_id = media_handle_sideload( $file_array, $new_id, $desc );

if ( is_wp_error( $new_attachment_id ) ) {
unlink( $file_array['tmp_name'] );
wp_delete_file( $file_array['tmp_name'] );
continue;
}
$new_post_author = wp_get_current_user();
Expand Down

0 comments on commit 10d6aff

Please sign in to comment.