Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#8284 closed defect (bug) (fixed)

previous_image_link and next_image_link broken following a recent change

Reported by: johnconners's profile johnconners Owned by:
Milestone: 2.7 Priority: normal
Severity: blocker Version: 2.7
Component: General Keywords: has-patch adjacent_image_link
Focuses: Cc:


[9774] has inadvertantly broken the underlying call to 'adjacent_image_link'. The test:


added in [9774] fails when it should succeed following the call to 'get_children' which passes 'post_parent' => $post->post_parent (and ultimately calls get_posts where the change was made). What appears to be happening is that in this case $post->post_parent is numeric, but is not an integer (so probably a string - there must be an int cast missing where it's set).

The easy fix is attached (change is_integer to is_numeric). It's either that or trawl through the code looking for where post_parent isn't cast to an int, thought I'd take the less dangerous (minimal code change) approach.

Attachments (1)

8284.diff (470 bytes) - added by johnconners 16 years ago.

Download all attachments as: .zip

Change History (2)

16 years ago

#1 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [9795]) Use is_numeric instead of is_integer. Props johnconners. fixes #8284

Note: See TracTickets for help on using tickets.