Committer: vsukhanov
LJSV-1192: fixed: "<lj user = ontd>" causes an errorU 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); + } } }