Ticket #18455: 18455.patch
File 18455.patch, 757 bytes (added by , 14 years ago) |
---|
-
wp-includes/taxonomy.php
2803 2803 // Touch every ancestor's lookup row for each post in each term 2804 2804 foreach ( $term_ids as $term_id ) { 2805 2805 $child = $term_id; 2806 while ( $parent = $terms_by_id[$child]->parent ) {2807 if ( !empty( $term_items[$term_id]) )2806 while ( !empty( $terms_by_id[$child] ) && $parent = $terms_by_id[$child]->parent ) { 2807 if ( !empty( $term_items[$term_id] ) ) 2808 2808 foreach ( $term_items[$term_id] as $item_id => $touches ) { 2809 2809 $term_items[$parent][$item_id] = isset($term_items[$parent][$item_id]) ? ++$term_items[$parent][$item_id]: 1; 2810 2810 }