Hush warnings.

        Patch by kareila. 

diffs (27 lines):

diff -r 02f3ee314c3d -r 3e74d0edc1cc cgi-bin/LJ/CleanHTML.pm
--- a/cgi-bin/LJ/CleanHTML.pm   Thu Dec 30 18:40:16 2010 +0800
+++ b/cgi-bin/LJ/CleanHTML.pm   Thu Dec 30 18:41:30 2010 +0800
@@ -1454,9 +1454,8 @@ sub clean_comment
 {
     my ($ref, $opts) = @_;
 
-    unless (ref $opts) {
-        $opts = { 'preformatted' => $opts };
-    }
+    $opts = { preformatted => $opts } unless ref $opts;
+    return 0 unless defined $$ref;
 
     # fast path:  no markup or URLs to linkify
     if ($$ref !~ /\<|\>|http/ && ! $opts->{preformatted}) {
diff -r 02f3ee314c3d -r 3e74d0edc1cc cgi-bin/LJ/S2/EntryPage.pm
--- a/cgi-bin/LJ/S2/EntryPage.pm        Thu Dec 30 18:40:16 2010 +0800
+++ b/cgi-bin/LJ/S2/EntryPage.pm        Thu Dec 30 18:41:30 2010 +0800
@@ -171,7 +171,7 @@ sub EntryPage
 
             my $comment_userpic;
             my $comment_userpic_style = 
$opts->{ctx}->[S2::PROPS]->{comment_userpic_style};
-            if ( ( my $pic = $userpic{$com->{picid}} ) && ( 
$comment_userpic_style ne 'off' ) )  {
+            if ( defined $com->{picid} && ( my $pic = $userpic{$com->{picid}} 
) && ( $comment_userpic_style ne 'off' ) )  {
                 my $width = $pic->{width};
                 my $height = $pic->{height};
                 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to