Make WordPress Core

Opened 7 weeks ago

Closed 7 weeks ago

Last modified 7 weeks ago

#61456 closed defect (bug) (fixed)

Taxonomy: Unused variable in `wp_set_object_terms()`

Reported by: dlh's profile dlh Owned by: costdev's profile costdev
Milestone: 6.6 Priority: normal
Severity: normal Version: 2.3
Component: Taxonomy Keywords: has-patch commit
Focuses: Cc:

Description (last modified by costdev)

In [5983], a call to clean_term_cache() was removed from wp_set_object_terms(). Since then, the $term_ids array that had been passed to clean_term_cache() has been populated inside one of the foreach loops but never used.

Change History (6)

This ticket was mentioned in PR #6846 on WordPress/wordpress-develop by @dlh.


7 weeks ago
#1

  • Keywords has-patch added

#2 @mukesh27
7 weeks ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 6.6

Hi there!

Thanks for the patch!

Look good to me and ready for commit for 6.6

#3 @costdev
7 weeks ago

  • Description modified (diff)

#4 @costdev
7 weeks ago

  • Owner set to costdev
  • Status changed from new to assigned

#5 @costdev
7 weeks ago

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

In 58427:

Taxonomy: Remove unused $term_ids in wp_set_object_terms().

In [5983], a call to clean_term_cache() was removed from wp_set_object_terms(). Since then, the $term_ids array that had been populated inside one of the foreach loops before being passed to the removed clean_term_cache() call has not been used.

This change removes the unused $term_ids variable.

Follow-up to [5983].

Props dlh, mukesh27.
Fixes #61456.

@costdev commented on PR #6846:


7 weeks ago
#6

Nice catch and thanks for the PR @dlh01! Committed in r58427.

Note: See TracTickets for help on using tickets.