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

0 comments on commit 33ba8c5

Please sign in to comment.