Make WordPress Core

Ticket #44183: 44183.2.diff

File 44183.2.diff, 511 bytes (added by johnbillion, 5 years ago)
  • src/wp-includes/class-wp.php

     
    597597                        $GLOBALS['single'] = 1;
    598598                }
    599599
    600                 if ( $wp_query->is_author() && isset( $wp_query->post ) ) {
    601                         $GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author );
     600                if ( $wp_query->is_author() ) {
     601                        $GLOBALS['authordata'] = get_userdata( get_queried_object_id() );
    602602                }
    603603        }
    604604