Opened 13 years ago
Closed 13 years ago
#25236 closed defect (bug) (fixed)
media.php undefined index.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.7 | Priority: | normal |
| Severity: | normal | Version: | 3.5 |
| Component: | Media | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description (last modified by )
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.
Attachments (2)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Introduced in [22783] and [23094].
In 3.4,
attachment_fields_to_savefilter was only called inmedia_upload_form_handler()for a post array received fromget_post(), which contained aguidfield: tags/3.6/wp-admin/includes/media.php#517.Since 3.5, it's also called in
edit_post()for an array that contains anattachment_urlfield 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()withwp_basename(), as in [22367] and [24585]. See 25236.patch.