Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#40154 closed defect (bug) (fixed)

Incorrectly formatted $taxonomies parameter passed to wp_get_object_terms filter

Reported by: ig_communitysites's profile ig_communitysites Owned by: boonebgorges's profile boonebgorges
Milestone: 4.7.4 Priority: normal
Severity: normal Version: 4.7
Component: Taxonomy Keywords:
Focuses: Cc:

Description

According to documentation: the $taxonomies parameter passed into the wp_get_object_terms filter at line 1911 of wp-includes/taxonomy.php should be "SQL-formatted (comma-separated and quoted) list of taxonomy names". That definitely used to be the case on v4.5.

In 4.7.x, however, that $taxonomies parameter is formatted thus:

$taxonomies = implode( ',', $taxonomies );

on line 1895. That just produces a comma-separated list, without any quoting.

Change History (3)

#1 @boonebgorges
8 years ago

  • Milestone changed from Awaiting Review to 4.7.4
  • Version changed from 4.7.3 to 4.7

Hi @ig_communitysites - Thanks for the ticket, and welcome to WordPress Trac!

You are correct that this is a regression. It was introduced in [38667].

#2 @boonebgorges
8 years ago

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

In 40290:

Fix the formatting of $taxonomies parameter of 'wp_get_object_terms' filter.

[38667] changed the way that the filter parameters are built. That
changeset didn't fully account for the pre-4.7 format of $taxonomies.

Props ig_communitysites.
Fixes #40154.

#3 @boonebgorges
8 years ago

In 40291:

Fix the formatting of $taxonomies parameter of 'wp_get_object_terms' filter.

[38667] changed the way that the filter parameters are built. That
changeset didn't fully account for the pre-4.7 format of $taxonomies.

Merge of [40290] to the 4.7 branch.

Props ig_communitysites.
Fixes #40154.

Note: See TracTickets for help on using tickets.