Opened 9 years ago
Closed 9 years ago
#32948 closed defect (bug) (fixed)
media_upload_header() outputs unenclosed post_type string
Reported by: | kylegilman | Owned by: | obenland |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Media | Keywords: | has-patch commit |
Focuses: | javascript, administration | Cc: |
Description
I'm seeing "Uncaught ReferenceError: post is not defined" in the JavaScript console whenever I load a custom Media Upload tab. I looked into it and the media_upload_header() function at source:trunk/src/wp-admin/includes/media.php@32964#L1752 adds the post_type as a JavaScript variable without enclosing it in quotes. In previous versions of WordPress it only output the post_id which is also not enclosed, but it's an integer so there wasn't an error.
Attachments (1)
Change History (5)
#2
@
9 years ago
- Keywords has-patch added; needs-patch removed
@johnbillion, is 32948.diff what you had in mind?
Note: See
TracTickets for help on using
tickets.
Introduced in r32673 as part of #19257 which ended up being pretty buggy.
This variable can be removed entirely as per r32676.