WordPress.org

Make WordPress Core

Ticket #15442: 15442-2.diff

File 15442-2.diff, 481 bytes (added by greuben, 3 years ago)

based on IRC discussion

  • wp-includes/category-template.php

     
    6767        $categories = get_the_terms( $id, 'category' ); 
    6868        if ( ! $categories ) 
    6969                $categories = array(); 
     70         
     71        $categories = array_values( $categories ); 
    7072 
    7173        foreach ( array_keys( $categories ) as $key ) { 
    7274                _make_cat_compat( $categories[$key] );