File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -947,7 +947,7 @@ function webp_uploads_convert_palette_png_to_truecolor( $file ): array {
947947
948948 // Check if the image is already truecolor.
949949 if ( imageistruecolor ( $ image ) ) {
950- imagedestroy ( $ image );
950+ imagedestroy ( $ image ); // phpcs:ignore Generic.PHP.DeprecatedFunctions.Deprecated
951951 return $ file ;
952952 }
953953
@@ -960,7 +960,7 @@ function webp_uploads_convert_palette_png_to_truecolor( $file ): array {
960960 // Overwrite the upload with the new truecolor PNG.
961961 imagepng ( $ image , $ file ['tmp_name ' ] );
962962 }
963- imagedestroy ( $ image );
963+ imagedestroy ( $ image ); // phpcs:ignore Generic.PHP.DeprecatedFunctions.Deprecated
964964
965965 return $ file ;
966966}
Original file line number Diff line number Diff line change @@ -1190,7 +1190,7 @@ static function () {
11901190 $ this ->assertNotSame ( $ original_file_hash , $ modified_file_hash );
11911191 $ img = imagecreatefrompng ( $ path );
11921192 $ this ->assertTrue ( imageistruecolor ( $ img ) );
1193- imagedestroy ( $ img );
1193+ imagedestroy ( $ img ); // phpcs:ignore Generic.PHP.DeprecatedFunctions.Deprecated
11941194
11951195 // Make sure the image converted to modern image format is not 0 bytes.
11961196 $ modern_image_format_path = get_attached_file ( $ attachment_id );
You can’t perform that action at this time.
0 commit comments