Make WordPress Core

Opened 21 years ago

Closed 21 years ago

Last modified 20 years ago

#1430 closed defect (bug) (fixed)

get_author_link does not work without $author_nicename defined

Reported by: scotty's profile scotty Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5.2
Component: General Keywords:
Focuses: Cc:

Description

There appears to be a typo in get_author_link() function in template-functions-author.php, when it tries to get author's 'nicename' from user cache. Here's the patch (against revision 2621)

Index: wp-includes/template-functions-author.php
===================================================================
--- wp-includes/template-functions-author.php   (revision 2621)
+++ wp-includes/template-functions-author.php   (working copy)
@@ -131,7 +131,7 @@
         $file = get_settings('home') . '/';
         $link = $file . '?author=' . $auth_ID;
     } else {
-        if ('' == $author_nicename) $author_nicename = $cache_userdata[$author_id]->author_nicename;
+        if ('' == $author_nicename) $author_nicename = $cache_userdata[$author_id]->user_nicename;
                                $link = str_replace('%author%', $author_nicename, $link);
                                $link = get_settings('home') . trailingslashit($link);
     }

Change History (3)

#1 @matt
21 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [2626]) Fix for get_author_link, fixes #1430

#2 @matt
21 years ago

  • Milestone set to 1.5.2

#3 @(none)
20 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.