Make WordPress Core

Changeset 45539


Ignore:
Timestamp:
06/15/2019 01:31:07 AM (5 years ago)
Author:
azaozz
Message:

After [45538]: fix a WPCS fix and make couple of var names consistent.

See #40439.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/image.php

    r45538 r45539  
    8888    // Meta error?
    8989    if ( empty( $image_meta ) ) {
    90         return $defined_sizes;
     90        return $registered_sizes;
    9191    }
    9292
     
    380380        $fallback_sizes = apply_filters( 'fallback_intermediate_image_sizes', $fallback_sizes, $metadata );
    381381
    382         $defined_sizes = wp_get_registered_image_subsizes();
    383         $merged_sizes  = array_intersect_key( $defined_sizes, array_flip( $fallback_sizes ) );
     382        $registered_sizes = wp_get_registered_image_subsizes();
     383        $merged_sizes     = array_intersect_key( $registered_sizes, array_flip( $fallback_sizes ) );
    384384
    385385        // Force thumbnails to be soft crops.
  • trunk/src/wp-includes/media.php

    r45538 r45539  
    236236        // fall back to the old thumbnail
    237237        $thumb_file = wp_get_attachment_thumb_file( $id );
    238         $info       = getimagesize( $thumb_file );
     238        $info       = null;
     239
     240        if ( $thumb_file ) {
     241            $info = getimagesize( $thumb_file );
     242        }
    239243
    240244        if ( $thumb_file && $info ) {
Note: See TracChangeset for help on using the changeset viewer.