[wp-trac] [WordPress Trac] #8284: previous_image_link and
next_image_link broken following a recent change
WordPress Trac
wp-trac at lists.automattic.com
Wed Nov 19 20:46:10 GMT 2008
#8284: previous_image_link and next_image_link broken following a recent change
-------------------------+--------------------------------------------------
Reporter: johnconners | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.7
Component: General | Version: 2.7
Severity: blocker | Keywords: has-patch adjacent_image_link
-------------------------+--------------------------------------------------
[9774] has inadvertantly broken the underlying call to
'adjacent_image_link'. The test:
{{{
is_integer($q['post_parent'])
}}}
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.
--
Ticket URL: <http://trac.wordpress.org/ticket/8284>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list