Make WordPress Core

Opened 6 months ago

Closed 6 months ago

Last modified 6 months 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.


6 months ago
#1

  • Keywords has-patch added

#2 @mukesh27
6 months 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
6 months ago

  • Description modified (diff)

#4 @costdev
6 months ago

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

#5 @costdev
6 months 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:


6 months ago
#6

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

Note: See TracTickets for help on using tickets.