Make WordPress Core

Opened 9 years ago

Closed 9 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 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 9 years ago.

Download all attachments as: .zip

Change History (4)

9 years ago

#1 @DrewAPicture
9 years ago

  • Description modified (diff)

#2 @SergeyBiryukov
9 years ago

According to the inline docs, get_post_gallery() always returns an array:

Perhaps the_post_format_gallery() should take an empty array into account instead?

#3 @SergeyBiryukov
9 years 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.