Plugin Directory

Changeset 736171


Ignore:
Timestamp:
07/04/2013 02:07:20 PM (13 years ago)
Author:
zemanta
Message:

Thumbnailer bugfix in tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wordpress-23-related-posts-plugin/tags/2.8/thumbnailer.php

    r736138 r736171  
    239239    if (!$image_id || is_wp_error($image_id)) { return false; }
    240240
    241     if (is_array($imagedata = wp_get_attachment_metadata($image_id))) {
    242         return array(
    243             'id' => $image_id,
    244             'data' => $imagedata
    245         );
    246     }
    247 
    248     return false;
     241    $imagedata = wp_get_attachment_metadata($image_id);
     242    if (!$imagedata || !is_array($imagedata) || !isset($imagedata['sizes']) || !is_array($imagedata['sizes'])) {
     243        return false;
     244    }
     245
     246    return array(
     247        'id' => $image_id,
     248        'data' => $imagedata
     249    );
    249250}
    250251
Note: See TracChangeset for help on using the changeset viewer.