WordPress.org

Make WordPress Core

Changeset 7651


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

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

File:
1 edited

Legend:

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

    r7611 r7651  
    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.