fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-10-31 08:20 am

[dw-free] Using a certain username in a user tag breaks Dreamwidth

[commit: http://hg.dwscoalition.org/dw-free/rev/f33827bd2627]

http://bugs.dwscoalition.org/show_bug.cgi?id=3999

get_renamed_user should be aware of whether the caller wants an array (user,
username), or wants just the user. (aka: ...don't break profile pages)

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/LJ/User.pm
--------------------------------------------------------------------------------
diff -r 40744a8bb951 -r f33827bd2627 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Mon Oct 31 16:19:08 2011 +0800
+++ b/cgi-bin/LJ/User.pm	Mon Oct 31 16:20:49 2011 +0800
@@ -1037,7 +1037,7 @@
 
     # return both the user object, and the last known renamedto username
     # in case the user object isn't valid
-    return ( $u, $username );
+    return wantarray ? ( $u, $username ) : $u;
 }
 
 
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org