Skip to content

Commit

Permalink
Media: Use strict comparison in make_subsize().
Browse files Browse the repository at this point in the history
Follow up from [55278].

Props bueltge, desrosj, mukesh27.
See #57370.


git-svn-id: https://develop.svn.wordpress.org/trunk@55300 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
danielbachhuber committed Feb 8, 2023
1 parent 17a4dcb commit 33ba8c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-image-editor-imagick.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ public function make_subsize( $size_data ) {
$size_data['crop'] = false;
}

if ( ( $this->size['width'] == $size_data['width'] ) && ( $this->size['height'] == $size_data['height'] ) ) {
if ( ( $this->size['width'] === $size_data['width'] ) && ( $this->size['height'] === $size_data['height'] ) ) {
return new WP_Error( 'image_subsize_create_error', __( 'The image already has the requested size.' ) );
}

Expand Down

1 comment on commit 33ba8c5

@yunusbayraktaroglu
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comparison and following comparison in resize() function should be removed, these makes the "wp_image_resize_identical_dimensions" (in image_resize_dimensions function) filter have no effect.

Please sign in to comment.