Make WordPress Core

Changeset 23094


Ignore:
Timestamp:
12/06/2012 05:34:17 AM (12 years ago)
Author:
markjaquith
Message:

Run the attachment_fields_to_save filter even if we don't get the fields we used to get. props nacin. fixes #22774

File:
1 edited

Legend:

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

    r23088 r23094  
    236236        }
    237237
    238         if ( isset( $post_data['attachments'][ $post_ID ] ) )
    239             $post_data = apply_filters( 'attachment_fields_to_save', $post_data, $post_data['attachments'][ $post_ID ] );
     238        $attachment_data = isset( $post_data['attachments'][ $post_ID ] ) ? $post_data['attachments'][ $post_ID ] : array();
     239        $post_data = apply_filters( 'attachment_fields_to_save', $post_data, $attachment_data );
    240240    }
    241241
Note: See TracChangeset for help on using the changeset viewer.