Ticket #7073 (closed defect: fixed)

Opened 3 months ago

Last modified 2 months ago

Another ambiguous column in query.php method get_posts()

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

Description

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

7073.diff (0.6 kB) - added by voxpelli on 06/24/08 07:42:26.

Change History

06/02/08 08:17:11 changed by voxpelli

With the latest trunk - I mean: revision 8030

06/24/08 06:21:29 changed by DD32

  • keywords set to needs-patch.
  • milestone set to 2.6.

06/24/08 07:42:26 changed by voxpelli

  • attachment 7073.diff added.

06/24/08 07:45:17 changed by voxpelli

  • keywords changed from needs-patch to has-patch needs-testing.

06/24/08 17:49:24 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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