WordPress.org

Make WordPress Core

Ticket #18458: patches-if-statement.diff

File patches-if-statement.diff, 385 bytes (added by wonderboymusic, 4 years ago)

Patch for this ticket

  • wp-includes/pluggable.php

     
    755755function is_user_logged_in() { 
    756756        $user = wp_get_current_user(); 
    757757 
    758         if ( $user->ID == 0 ) 
     758        if ( !is_object( $user ) || $user->ID == 0 ) 
    759759                return false; 
    760760 
    761761        return true;