From c98b4ce7f32c8889e1e73c56aa484bcf0be5ed2d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 3 Apr 2024 10:33:24 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-includes/class-wp-image-editor-gd.php`. Follow-up to [22094], [22817], [50810], [57524]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. Built from https://develop.svn.wordpress.org/trunk@57917 git-svn-id: http://core.svn.wordpress.org/trunk@57418 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-image-editor-gd.php | 12 ++++++------ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-includes/class-wp-image-editor-gd.php b/wp-includes/class-wp-image-editor-gd.php index c7f562693f..5aa85b0eb5 100644 --- a/wp-includes/class-wp-image-editor-gd.php +++ b/wp-includes/class-wp-image-editor-gd.php @@ -64,15 +64,15 @@ class WP_Image_Editor_GD extends WP_Image_Editor { $image_types = imagetypes(); switch ( $mime_type ) { case 'image/jpeg': - return ( $image_types & IMG_JPG ) != 0; + return ( $image_types & IMG_JPG ) !== 0; case 'image/png': - return ( $image_types & IMG_PNG ) != 0; + return ( $image_types & IMG_PNG ) !== 0; case 'image/gif': - return ( $image_types & IMG_GIF ) != 0; + return ( $image_types & IMG_GIF ) !== 0; case 'image/webp': - return ( $image_types & IMG_WEBP ) != 0; + return ( $image_types & IMG_WEBP ) !== 0; case 'image/avif': - return ( $image_types & IMG_AVIF ) != 0; + return ( $image_types & IMG_AVIF ) !== 0; } return false; @@ -188,7 +188,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor { * @return true|WP_Error */ public function resize( $max_w, $max_h, $crop = false ) { - if ( ( $this->size['width'] == $max_w ) && ( $this->size['height'] == $max_h ) ) { + if ( ( $this->size['width'] === $max_w ) && ( $this->size['height'] === $max_h ) ) { return true; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 4c0572d8bb..b48d8a3ca0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-57916'; +$wp_version = '6.6-alpha-57917'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.