Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#7073 closed defect (bug) (fixed)

Another ambiguous column in query.php method get_posts()

Reported by: voxpelli Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.1
Component: General Keywords: has-patch needs-testing
Focuses: Cc:


In the latest trunk the line 931 in query.php should be:

$where .= " AND ($wpdb->posts.ID = '$reqpage')";

This bug also exists in v2.5.1

Background: A plugin of mine uses the filters posts_fields, posts_where and post_join and the field ID exists in the joined table which today will cause the query to fail because it writes (ID = '53') in the where-clause which confuses MySQL - it should be (wp_posts.ID = '53').

Attachments (1)

7073.diff (605 bytes) - added by voxpelli 10 years ago.

Download all attachments as: .zip

Change History (5)

#1 @voxpelli
10 years ago

With the latest trunk - I mean: revision 8030

#2 @DD32
10 years ago

  • Keywords needs-patch added
  • Milestone set to 2.6

10 years ago

#3 @voxpelli
10 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

#4 @ryan
10 years ago

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

(In [8185]) Disambiguate column. Props voxpelli. fixes #7073

Note: See TracTickets for help on using tickets.