WordPress.org

Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #25236


Ignore:
Timestamp:
09/06/2013 12:59:54 PM (7 years ago)
Author:
SergeyBiryukov
Comment:

Introduced in [22783] and [23094].

In 3.4, attachment_fields_to_save filter was only called in media_upload_form_handler() for a post array received from get_post(), which contained a guid field: tags/3.6/wp-admin/includes/media.php#517.

Since 3.5, it's also called in edit_post() for an array that contains an attachment_url field instead: tags/3.6/wp-admin/includes/post.php#L264.

I'd suggest checking both fields, as long as we still have both scenarios in core. Although the former one is no longer used in the new media UI, there's a plugin that re-enables the old UI.

We should also replace basename() with wp_basename(), as in [22367] and [24585]. See 25236.patch.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25236

    • Property Keywords commit added
    • Property Version changed from to 3.5
    • Property Milestone changed from Awaiting Review to 3.7
  • Ticket #25236 – Description

    initial v2  
    1 If a image is edited and the title is blank an undefined index is produced as it is looking for $post['guid'] which is not set.
     1If a image is edited and the title is blank an undefined index is produced as it is looking for `$post['guid']` which is not set.