WordPress.org

Make WordPress Core

#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 DrewAPicture)

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)

24393.patch (530 bytes) - added by DrewAPicture 11 months ago.

Download all attachments as: .zip

Change History (4)

DrewAPicture11 months ago

comment:1 DrewAPicture11 months ago

  • Description modified (diff)

comment:2 SergeyBiryukov11 months ago

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?

comment:3 SergeyBiryukov11 months ago

  • Milestone 3.6 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #24390.

Note: See TracTickets for help on using tickets.