Make WordPress Core


Ignore:
Timestamp:
03/12/2024 11:47:25 AM (7 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in WP_Image_Editor_GD::_save().

Follow-up to [50810], [57524].

Props pbearne, mukesh27.
Fixes #60643.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-image-editor-gd.php

    r57614 r57811  
    534534                return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) );
    535535            }
    536         } elseif ( 'image/webp' == $mime_type ) {
    537             if ( ! function_exists( 'imagewebp' ) || ! $this->make_image( $filename, 'imagewebp', array( $image, $filename, $this->get_quality() ) ) ) {
     536        } elseif ( 'image/webp' === $mime_type ) {
     537            if ( ! function_exists( 'imagewebp' )
     538                || ! $this->make_image( $filename, 'imagewebp', array( $image, $filename, $this->get_quality() ) )
     539            ) {
    538540                return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) );
    539541            }
    540         } elseif ( 'image/avif' == $mime_type ) {
    541             if ( ! function_exists( 'imageavif' ) || ! $this->make_image( $filename, 'imageavif', array( $image, $filename, $this->get_quality() ) ) ) {
     542        } elseif ( 'image/avif' === $mime_type ) {
     543            if ( ! function_exists( 'imageavif' )
     544                || ! $this->make_image( $filename, 'imageavif', array( $image, $filename, $this->get_quality() ) )
     545            ) {
    542546                return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) );
    543547            }
Note: See TracChangeset for help on using the changeset viewer.