Fix warning when we don't have a default picture.

        Patch by kareila. 

diffs (31 lines):

diff -r ad32e1bda9d6 -r eeb19c4a4ee8 cgi-bin/DW/Logic/ProfilePage.pm
--- a/cgi-bin/DW/Logic/ProfilePage.pm   Tue Nov 23 18:55:11 2010 +0800
+++ b/cgi-bin/DW/Logic/ProfilePage.pm   Wed Nov 24 11:32:10 2010 +0800
@@ -137,7 +137,7 @@ sub userpic {
    
 
     #  Set the wrapper materials to surrounded the  userpic image
-    my ( $apre, $apost );
+    my ( $apre, $apost ) = ( '', '' );
     if ( $ret->{userpic_url} ) {
         $apre = "<a href='" . LJ::ehtml($ret->{userpic_url}) . "'>";
         $apost = "</a>";
diff -r ad32e1bda9d6 -r eeb19c4a4ee8 cgi-bin/LJ/Userpic.pm
--- a/cgi-bin/LJ/Userpic.pm     Tue Nov 23 18:55:11 2010 +0800
+++ b/cgi-bin/LJ/Userpic.pm     Wed Nov 24 11:32:10 2010 +0800
@@ -73,6 +73,7 @@ LJ::Userpic
 # Return existing with userid and picid populated, or make new.
 sub instance {
     my ($class, $u, $picid) = @_;
+    $picid = 0 unless defined $picid;
     my $up;
 
     # return existing one, if loaded
@@ -117,6 +118,7 @@ sub get {
 
 sub _skeleton {
     my ($class, $u, $picid) = @_;
+    $picid = 0 unless defined $picid;
     # starts out as a skeleton and gets loaded in over time, as needed:
     return bless {
         userid => $u->{userid},
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to