Opened 11 years ago
Closed 11 years ago
#24393 closed defect (bug) (duplicate)
the_post_format_gallery() should not echo an empty array
Reported by: | DrewAPicture | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.6 |
Component: | Post Formats | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
If a gallery format doesn't contain a gallery and you're using the_post_format_gallery()
, an empty array might be echoed. Patch attached.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
According to the inline docs,
get_post_gallery()
always returns an array:trunk/wp-includes/media.php@24329#L2371.
Perhaps
the_post_format_gallery()
should take an empty array into account instead?