Make WordPress Core

Ticket #35025: 35025-fix.diff

File 35025-fix.diff, 807 bytes (added by rogerhub, 9 years ago)

Fix for ticket #35025

  • src/wp-includes/comment-template.php

     
    13301330        // Trees must be flattened before they're passed to the walker.
    13311331        $comments_flat = array();
    13321332        foreach ( $_comments as $_comment ) {
    1333                 $comments_flat = array_merge( $comments_flat, array( $_comment ), $_comment->get_children( array(
     1333                $comments_flat[] = $_comment;
     1334                $comment_children = $_comment->get_children( array(
    13341335                        'format' => 'flat',
    13351336                        'status' => $comment_args['status'],
    13361337                        'orderby' => $comment_args['orderby']
    1337                 ) ) );
     1338                ) );
     1339                foreach ( $comment_children as $comment_child ) {
     1340                        $comments_flat[] = $comment_child;
     1341                }
    13381342        }
    13391343
    13401344        /**