WordPress.org

Make WordPress Core

Ticket #40671: 40671-3.patch

File 40671-3.patch, 528 bytes (added by GunGeekATX, 3 years ago)

Updated patch made from correct directory

  • src/wp-includes/class-wp-term.php

    diff --git src/wp-includes/class-wp-term.php src/wp-includes/class-wp-term.php
    index 8eb87efbe0..f458271f71 100644
    final class WP_Term { 
    142142
    143143                        // If a taxonomy was specified, find a match.
    144144                        if ( $taxonomy ) {
     145
     146                                // Clear out the cached term since it does not have the
     147                                // matching taxonomy.
     148                                $_term = false;
     149
    145150                                foreach ( $terms as $match ) {
    146151                                        if ( $taxonomy === $match->taxonomy ) {
    147152                                                $_term = $match;