From 18050c7ffa17da5091cf9c88621006abed9f5719 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 12 Mar 2024 11:49:15 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `WP_Image_Editor_GD::_save()`. Follow-up to [50810], [57524]. Props pbearne, mukesh27. Fixes #60643. Built from https://develop.svn.wordpress.org/trunk@57811 git-svn-id: http://core.svn.wordpress.org/trunk@57312 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-image-editor-gd.php | 12 ++++++++---- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/wp-includes/class-wp-image-editor-gd.php b/wp-includes/class-wp-image-editor-gd.php index cbfa6dba38..c7f562693f 100644 --- a/wp-includes/class-wp-image-editor-gd.php +++ b/wp-includes/class-wp-image-editor-gd.php @@ -533,12 +533,16 @@ class WP_Image_Editor_GD extends WP_Image_Editor { if ( ! $this->make_image( $filename, 'imagejpeg', array( $image, $filename, $this->get_quality() ) ) ) { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } - } elseif ( 'image/webp' == $mime_type ) { - if ( ! function_exists( 'imagewebp' ) || ! $this->make_image( $filename, 'imagewebp', array( $image, $filename, $this->get_quality() ) ) ) { + } elseif ( 'image/webp' === $mime_type ) { + if ( ! function_exists( 'imagewebp' ) + || ! $this->make_image( $filename, 'imagewebp', array( $image, $filename, $this->get_quality() ) ) + ) { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } - } elseif ( 'image/avif' == $mime_type ) { - if ( ! function_exists( 'imageavif' ) || ! $this->make_image( $filename, 'imageavif', array( $image, $filename, $this->get_quality() ) ) ) { + } elseif ( 'image/avif' === $mime_type ) { + if ( ! function_exists( 'imageavif' ) + || ! $this->make_image( $filename, 'imageavif', array( $image, $filename, $this->get_quality() ) ) + ) { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } } else { diff --git a/wp-includes/version.php b/wp-includes/version.php index 1c59788530..3c48bdf148 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-57809'; +$wp_version = '6.6-alpha-57811'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.