From b5bb40cf2a79e1823e133b76fddc3bf7750a3643 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 24 Jun 2013 13:11:43 +0000 Subject: [PATCH] Use capitalized ID column name in get_adjacent_post(). props hypertextranch. fixes #24575. git-svn-id: https://develop.svn.wordpress.org/trunk@24506 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/link-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 606f2316e3..a7e09b2477 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -1175,7 +1175,7 @@ function get_adjacent_post( $in_same_cat = false, $excluded_categories = '', $pr $where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare("WHERE p.post_date $op %s AND p.post_type = %s AND p.post_status = 'publish' $posts_in_ex_cats_sql", $current_post_date, $post->post_type), $in_same_cat, $excluded_categories ); $sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1" ); - $query = "SELECT p.id FROM $wpdb->posts AS p $join $where $sort"; + $query = "SELECT p.ID FROM $wpdb->posts AS p $join $where $sort"; $query_key = 'adjacent_post_' . md5($query); $result = wp_cache_get($query_key, 'counts'); if ( false !== $result ) {