From 0a7982614628d4fc6d6c9c4b8142a759ba9c4812 Mon Sep 17 00:00:00 2001 From: Nilambar Sharma Date: Thu, 22 Feb 2024 17:06:53 +0545 Subject: [PATCH] Remove extraneous error check (#191) --- src/Media_Command.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Media_Command.php b/src/Media_Command.php index 9ecef42c..9448aa1a 100644 --- a/src/Media_Command.php +++ b/src/Media_Command.php @@ -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 ) ) {