Support » Plugin: Tag Groups » Bug with get_group_terms and ‘all’

  • Resolved luke4roads

    (@luke4roads)


    Hey there,

    Slight bug with get_group_terms in class.group.php – it has two bugs when $fields is ‘all’ (the default) as it uses $result which doesn’t exist in this scope and unset($tag) which also won’t remove the entry from the returned set.

    Here’s a fixed version for lines 513 -> 527 of class.group.php:

    $result = array();
    
            foreach ( $terms as $key => $term ) {
    
              $tg_term = new TagGroups_Term( $term );
    
              if ( $tg_term->is_in_group( $this->term_group ) && ! in_array( $term->term_id, $result ) ) {
    
                $result[] = $term;
    
              }
    
            }
    
            return $result;
Viewing 1 replies (of 1 total)
  • Plugin Author Chris

    (@camthor)

    Thank you for reporting, I will check it out!

Viewing 1 replies (of 1 total)
  • The topic ‘Bug with get_group_terms and ‘all’’ is closed to new replies.