Make WordPress Core

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's profile 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 years ago.

Download all attachments as: .zip

Change History (4)

@DrewAPicture
11 years ago

#1 @DrewAPicture
11 years ago

  • Description modified (diff)

#2 @SergeyBiryukov
11 years 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?

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