Make WordPress Core


Ignore:
Timestamp:
03/29/2014 06:07:17 AM (12 years ago)
Author:
nacin
Message:

Avoid infinite recursion in get_term_children() when a term is incorrectly a parent of itself.

props kovshenin.
fixes #27123.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r27827 r27837  
    11081108
    11091109    foreach ( (array) $terms[$term_id] as $child ) {
     1110        if ( $term_id == $child ) {
     1111            continue;
     1112        }
     1113
    11101114        if ( isset($terms[$child]) )
    11111115            $children = array_merge($children, get_term_children($child, $taxonomy));
Note: See TracChangeset for help on using the changeset viewer.