Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#22950 closed defect (bug) (fixed)

get_boundary_post Does not return single post object

Reported by: pathawks Owned by: DrewAPicture
Priority: normal Milestone: 3.9
Component: Query Version: 2.8
Severity: normal Keywords: has-patch
Cc: Focuses: docs, template

Description

get_boundary_post Seems not to return a single post object, the way get_adjacent_post does.

It seems that get_boundary_post should call array_shift or get_post on the results, in a similar way to get_adjacent_post.

It's just odd that the behavior is different.

Attachments (1)

22950.diff (747 bytes ) - added by ericlewis 13 years ago.

Download all attachments as: .zip

Change History (7)

#1 @toscho
14 years ago

  • Cc info@… added

#2 @ericlewis
13 years ago

Although it might be strange, changing the return value here would break any code built with get_boundary_post(). The cost of backwards compatibility is dealing with these odd nuances.

@ericlewis
13 years ago

#3 @ericlewis
13 years ago

  • Component GeneralQuery
  • Focuses docs template added

We should update the inline documentation here, it's incorrect as it stands. See attachment:22950.diff.

Last edited 13 years ago by ericlewis (previous) (diff)

#4 @ericlewis
13 years ago

  • Keywords has-patch added
  • Version2.8

#5 @DrewAPicture
13 years ago

  • Milestone Awaiting Review3.9

Docs update looks good.

#6 @DrewAPicture
13 years ago

  • Owner set to DrewAPicture
  • Resolutionfixed
  • Status newclosed

In 27235:

Correct PHPDoc return description for get_boundary_post().

Props ericlewis.
Fixes #22950.

Note: See TracTickets for help on using tickets.