vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r17302: LJSV-1192: fixed: "<lj user = ontd>" cau...

Committer: vsukhanov
LJSV-1192: fixed: "<lj user = ontd>" causes an error
U   trunk/cgi-bin/LJ/User.pm
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2010-09-07 20:45:59 UTC (rev 17301)
+++ trunk/cgi-bin/LJ/User.pm	2010-09-08 02:58:57 UTC (rev 17302)
@@ -5568,10 +5568,14 @@
 
     # Traverse the renames to the final journal
     if ($u) {
-        while ($u->{'journaltype'} eq 'R' && $hops-- > 0) {
+        while ($u and $u->journaltype eq 'R' and $hops-- > 0) {
             my $rt = $u->prop("renamedto");
             last unless length $rt;
-            $u = LJ::load_user($rt);
+            if ($rt =~ /^https?:\/\//){
+                $u = LJ::User->new_from_url($rt);
+            } else {
+                $u = LJ::load_user($rt);
+            }
         }
     }
 

Tags: livejournal, pm, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment