From 365efb13c2f2f9de572e53a4c115a0d59232e54f Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 21 Feb 2023 21:02:28 +0000 Subject: [PATCH] Taxonomy: Rename temporary variable in `wp_queue_posts_for_term_meta_lazyload()`. This ensures the `$term_ids` variable only contains term IDs and is not filled with full term objects due to deprecated term caching. Introduced in [55252]. Props skithund, Chouby, joemcgill, flixos90, ocean90. Fixes #57150. git-svn-id: https://develop.svn.wordpress.org/trunk@55401 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 8cc9faf63b..f1ad0bde5f 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -7802,9 +7802,9 @@ function wp_queue_posts_for_term_meta_lazyload( $posts ) { $cached_term_ids = wp_cache_get_multiple( $post_ids, "{$taxonomy}_relationships" ); if ( is_array( $cached_term_ids ) ) { $cached_term_ids = array_filter( $cached_term_ids ); - foreach ( $cached_term_ids as $term_ids ) { + foreach ( $cached_term_ids as $_term_ids ) { // Backward compatibility for if a plugin is putting objects into the cache, rather than IDs. - foreach ( $term_ids as $term_id ) { + foreach ( $_term_ids as $term_id ) { if ( is_numeric( $term_id ) ) { $prime_term_ids[] = (int) $term_id; $prime_taxonomy_ids[ $taxonomy ][] = (int) $term_id;