Make WordPress Core

Ticket #29766: 29766.patch

File 29766.patch, 922 bytes (added by afercia, 11 years ago)
  • src/wp-admin/includes/class-wp-comments-list-table.php

     
    525525                                comment_author_email_link();
    526526                                echo '<br />';
    527527                        }
    528                         echo '<a href="edit-comments.php?s=';
    529                         comment_author_IP();
    530                         echo '&amp;mode=detail';
    531                         if ( 'spam' == $comment_status )
    532                                 echo '&amp;comment_status=spam';
    533                         echo '">';
    534                         comment_author_IP();
    535                         echo '</a>';
     528                        $comment_author_IP = get_comment_author_IP();
     529                        if ( ! empty( $comment_author_IP ) ) {
     530                                echo '<a href="edit-comments.php?s=' . $comment_author_IP . '&amp;mode=detail';
     531                                if ( 'spam' == $comment_status ) {
     532                                        echo '&amp;comment_status=spam';
     533                                }
     534                                echo '">' . $comment_author_IP . '</a>';
     535                        }
    536536                }
    537537        }
    538538