Ticket #2976 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

get_author_link() can fail if nicename not provided

Reported by: markjaquith Assigned to: anonymous
Priority: normal Milestone:
Component: General Version: 2.0.3
Severity: normal Keywords:
Cc:

Description

get_author_link() takes an echo true/false, an author ID, and a third (optional) param: the author's nicename.

If the nicename isn't provided and the author's data isn't cached in the global $cache_userdata, the link will be incorrect.

Here is the offending code:

		if ( '' == $author_nicename )
			$author_nicename = $cache_userdata[$author_id]->user_nicename;

shouldn't we be using the object cache here?

Change History

07/26/06 08:42:33 changed by ryan

We should use get_userdata() so that we hit the cache.

07/27/06 23:25:46 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [4054]) Use get_userdata(). fixes #2976

07/27/06 23:27:28 changed by ryan

(In [4055]) Use get_userdata(). fixes #2976

07/27/06 23:31:27 changed by ryan

  • milestone set to 2.0.4.

11/30/06 19:41:50 changed by

  • milestone deleted.

Milestone 2.0.4 deleted