WordPress.org

Make WordPress Core

Ticket #23506: get-terms-0-based-taxonomies.diff

File get-terms-0-based-taxonomies.diff, 543 bytes (added by nbachiyski, 9 years ago)
  • wp-includes/taxonomy.php

     
    11901190        if ( ! is_array( $taxonomies ) )
    11911191                $taxonomies = array( $taxonomies );
    11921192
     1193        // so that we can safely assume the array is 0-based
     1194        $taxonomies = array_values( $taxonomies );
     1195
    11931196        foreach ( $taxonomies as $taxonomy ) {
    11941197                if ( ! taxonomy_exists($taxonomy) ) {
    11951198                        $error = new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));