Fix notice on edit posts page when logged in as a user without the 'edit_others_posts' capability.

git-svn-id: https://develop.svn.wordpress.org/trunk@12390 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2009-12-13 13:01:30 +00:00
parent 952cfa477f
commit fafe6e5f01
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ $class = '';
$allposts = '';
if ( $user_posts ) {
if ( $_GET['author'] == $current_user->ID )
if ( isset( $_GET['author'] ) && ( $_GET['author'] == $current_user->ID ) )
$class = ' class="current"';
$status_links[] = "<li><a href='edit.php?author=$current_user->ID'$class>" . sprintf( _nx( 'My Posts <span class="count">(%s)</span>', 'My Posts <span class="count">(%s)</span>', $user_posts_count, 'posts' ), number_format_i18n( $user_posts_count ) ) . '</a>';
$allposts = '?all_posts=1';