Make WordPress Core

Ticket #37292: 37292.diff

File 37292.diff, 519 bytes (added by michalzuber, 9 years ago)

Check if is object

  • wp-includes/category-template.php

    diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php
    index 8bba6b4..9594ad2 100644
    a b function get_the_category_list( $separator = '', $parents='', $post_id = false ) 
    219219        } else {
    220220                $i = 0;
    221221                foreach ( $categories as $category ) {
     222            if ( ! is_object( $category ) )
     223                continue;
     224
    222225                        if ( 0 < $i )
    223226                                $thelist .= $separator;
    224227                        switch ( strtolower( $parents ) ) {