Ticket #56499: 56499.diff
File 56499.diff, 1.1 KB (added by , 2 years ago) |
---|
-
src/wp-admin/includes/dashboard.php
1058 1058 $comments_query['status'] = 'approve'; 1059 1059 } 1060 1060 1061 while ( count( $comments ) < $total_items && $possible = get_comments( $comments_query ) ) { 1062 if ( ! is_array( $possible ) ) { 1061 do { 1062 $possible = get_comments( $comments_query ); 1063 1064 if ( empty( $possible ) || ! is_array( $possible ) ) { 1063 1065 break; 1064 1066 } 1065 1067 … … 1068 1070 continue; 1069 1071 } 1070 1072 1071 $comments[] = $comment; 1073 $comments[] = $comment; 1074 $comments_count = count( $comments ); 1072 1075 1073 if ( count( $comments )=== $total_items ) {1076 if ( $comments_count === $total_items ) { 1074 1077 break 2; 1075 1078 } 1076 1079 } … … 1077 1080 1078 1081 $comments_query['offset'] += $comments_query['number']; 1079 1082 $comments_query['number'] = $total_items * 10; 1080 } 1083 } while ( $comments_count < $total_items ); 1081 1084 1082 1085 if ( $comments ) { 1083 1086 echo '<div id="latest-comments" class="activity-block table-view-list">';