WordPress.org

Make WordPress Core

Changeset 21506


Ignore:
Timestamp:
08/14/12 19:07:56 (20 months 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.