Changeset 8261

Show
Ignore:
Timestamp:
07/06/08 16:40:15 (3 months ago)
Author:
ryan
Message:

Make sure attachment meta data is an array. Props nbachiyski. fixes #7252

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/media.php

    r8257 r8261  
    275275 
    276276function image_get_intermediate_size($post_id, $size='thumbnail') { 
    277     if ( !$imagedata = wp_get_attachment_metadata( $post_id ) ) 
     277    if ( !is_array( $imagedata = wp_get_attachment_metadata( $post_id ) ) ) 
    278278        return false; 
    279279 
  • trunk/wp-includes/post.php

    r8203 r8261  
    24252425    if ( !$post =& get_post( $post_id ) ) 
    24262426        return false; 
    2427     if ( !$imagedata = wp_get_attachment_metadata( $post->ID ) ) 
     2427    if ( !is_array( $imagedata = wp_get_attachment_metadata( $post->ID ) ) ) 
    24282428        return false; 
    24292429