Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#24575 closed defect (bug) (fixed)

link-template.php does not use canonical capitalized ID column name.

Reported by: hypertextranch Owned by: SergeyBiryukov
Milestone: 3.6 Priority: normal
Severity: trivial Version: 3.5
Component: Template Keywords: has-patch
Focuses: Cc:


The primary key field of $wpdb->posts is ID (all caps) however one query in link-template.php references it as p.id this is not an issue for MySQL as field names are case insensitive however it does not conform to how it's used elsewhere and poses problems for plugins like PostgreSQL for WordPress.

Attachments (1)

24575.patch (834 bytes) - added by hypertextranch 2 years ago.

Download all attachments as: .zip

Change History (3)

@hypertextranch2 years ago

comment:1 @SergeyBiryukov2 years ago

  • Component changed from General to Template
  • Milestone changed from Awaiting Review to 3.6
  • Version changed from trunk to 3.5

Introduced in [21919].

comment:2 @SergeyBiryukov2 years ago

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

In 24506:

Use capitalized ID column name in get_adjacent_post(). props hypertextranch. fixes #24575.

Note: See TracTickets for help on using tickets.