Make WordPress Core

Ticket #44183: 44183.diff

File 44183.diff, 551 bytes (added by subrataemfluence, 8 years ago)
  • class-wp.php

    diff --git a/class-wp.php b/class-wp.php
    index dfc2f97..92e8036 100755
    a b class WP { 
    593593                        $GLOBALS['single'] = 1;
    594594                }
    595595
    596                 if ( $wp_query->is_author() && isset( $wp_query->post ) ) {
    597                         $GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author );
     596                if ( $wp_query->is_author() ){
     597                        if( isset( $wp_query->post ) )
     598                                $GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author );
     599                        else
     600                                $GLOBALS['authordata'] = get_userdata( get_queried_object()->ID );
    598601                }
    599602        }
    600603