Skip to content

Commit

Permalink
Remove extraneous error check (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar authored Feb 22, 2024
1 parent d3b4d78 commit 0a79826
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Media_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,12 +630,6 @@ private function process_regeneration( $id, $skip_delete, $only_missing, $image_
}

$metadata = wp_generate_attachment_metadata( $id, $fullsizepath );
if ( is_wp_error( $metadata ) ) {
WP_CLI::warning( sprintf( '%s (ID %d)', $metadata->get_error_message(), $id ) );
WP_CLI::log( "$progress Couldn't regenerate thumbnails for $att_desc." );
++$errors;
return;
}

// Note it's possible for no metadata to be generated for PDFs if restricted to a specific image size.
if ( empty( $metadata ) && ! ( $is_pdf && $image_size ) ) {
Expand Down

0 comments on commit 0a79826

Please sign in to comment.