Make WordPress Core

Changeset 7650


Ignore:
Timestamp:
04/14/2008 04:30:09 PM (17 years ago)
Author:
ryan
Message:

Fix image fetching in get_media_items(). Props tellyworth. fixes #6657 for 2.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-admin/includes/media.php

    r7612 r7650  
    591591
    592592function get_media_items( $post_id, $errors ) {
    593     if ( $post_id && $post = get_post($post_id) ) {
    594         if ( $post->post_type == 'attachment' )
     593    if ( $post_id ) {
     594        $post = get_post($post_id);
     595        if ( $post && $post->post_type == 'attachment' )
    595596            $attachments = array($post->ID => $post);
    596597        else
Note: See TracChangeset for help on using the changeset viewer.