From 33ba8c54aa2e35af47d1afd8ad3691694d6e61e2 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Wed, 8 Feb 2023 20:49:36 +0000 Subject: [PATCH] Media: Use strict comparison in `make_subsize()`. 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 --- src/wp-includes/class-wp-image-editor-imagick.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-image-editor-imagick.php b/src/wp-includes/class-wp-image-editor-imagick.php index ee12b401d9249..40e3cbb823fec 100644 --- a/src/wp-includes/class-wp-image-editor-imagick.php +++ b/src/wp-includes/class-wp-image-editor-imagick.php @@ -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.' ) ); }