Make WordPress Core

Ticket #34138: 341381.patch

File 341381.patch, 879 bytes (added by rommelxcastro, 9 years ago)

comments duplicated issue fixed

  • wp-includes/class-wp-comment-query.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    410410                _prime_comment_caches( $comment_ids, $this->query_vars['update_comment_meta_cache'] );
    411411
    412412                // Fetch full comment objects from the primed cache.
     413                // fallback to get_comment function since cache could be disabled @see wp_suspend_cache_addition()
    413414                $_comments = array();
    414415                foreach ( $comment_ids as $comment_id ) {
    415                         if ( $_comment = wp_cache_get( $comment_id, 'comment' ) ) {
     416                        if ( ( $_comment = wp_cache_get( $comment_id, 'comment' ) ) || ( $_comment = get_comment( $comment_id ) ) ) {
    416417                                $_comments[] = $_comment;
    417418                        }
    418419                }