Making WordPress.org


Ignore:
Timestamp:
04/22/2026 10:37:39 PM (4 months ago)
Author:
coffee2code
Message:

Photo Directory, Photo: Account for boolean false being returned by wp_getimagesize().

Syncs with upstream change to wp_read_image_metadata().

See https://core.trac.wordpress.org/changeset/61291.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/photo.php

    r14825 r14826  
    207207                }
    208208
    209                 list( , , $image_type ) = wp_getimagesize( $file );
     209                $image_size = wp_getimagesize( $file );
     210
     211                if ( false === $image_size ) {
     212                        return false;
     213                }
     214
     215                list( , , $image_type ) = $image_size;
    210216
    211217                /*
Note: See TracChangeset for help on using the changeset viewer.