Skip to content

Commit

Permalink
fix fatal error with youtube sideloader
Browse files Browse the repository at this point in the history
  • Loading branch information
tamw-wnet committed Feb 22, 2024
1 parent 4d003ad commit 5fca1bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/class-youtube-oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ public function sideload_image_into_post_as_thumbnail($post_id = false, $url) {

// If error storing temporarily, unlink
if ( is_wp_error( $tmp ) ) {
@unlink($file_array['tmp_name']);
$tmp_name = __toString($tmp);
@unlink($tmp_name);
$file_array['tmp_name'] = '';
}

Expand Down

0 comments on commit 5fca1bb

Please sign in to comment.