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
This commit is contained in:
Sergey Biryukov 2024-03-12 11:49:15 +00:00
parent 2ef60cc432
commit 18050c7ffa
2 changed files with 9 additions and 5 deletions

View File

@ -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 {

View File

@ -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.