Committer: sbelyaev
LJSV-1557: 500 error fixU trunk/cgi-bin/LJ/S2.pm
Modified: trunk/cgi-bin/LJ/S2.pm =================================================================== --- trunk/cgi-bin/LJ/S2.pm 2011-12-13 11:15:41 UTC (rev 20771) +++ trunk/cgi-bin/LJ/S2.pm 2011-12-13 12:07:00 UTC (rev 20772) @@ -852,7 +852,8 @@ $_[0] =~ s!\n!<br />!g if $mode eq 'simple-html'; } elsif ($mode eq 'html' || $mode eq 'html-oneline') { - LJ::CleanHTML::clean_event(\$_[0], {posterid => $u->userid}); + my $userid = $u ? $u->userid : undef; + LJ::CleanHTML::clean_event(\$_[0], {posterid => $userid}); $_[0] =~ s!\n!<br />!g if $mode eq 'html'; } elsif ($mode eq 'css') {