Make WordPress Core


Ignore:
Timestamp:
08/14/2012 07:07:56 PM (12 years ago)
Author:
ryan
Message:

Add isset() check to avoid notice. Props c3mdigital. fixes #21512

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r21413 r21506  
    656656    }
    657657
    658     if ( $user && ( $user_id == $post_author || $user->has_cap('moderate_comments') ) ) {
     658    if ( isset( $user ) && ( $user_id == $post_author || $user->has_cap( 'moderate_comments' ) ) ) {
    659659        // The author and the admins get respect.
    660660        $approved = 1;
Note: See TracChangeset for help on using the changeset viewer.