vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r22152: LJSUP-12444: need to handle exception wh...

Committer: vad
LJSUP-12444: need to handle exception when identity data is missing while the account is marked as 'identity'
U   trunk/cgi-bin/LJ/User.pm
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2012-06-01 20:02:54 UTC (rev 22151)
+++ trunk/cgi-bin/LJ/User.pm	2012-06-03 17:27:18 UTC (rev 22152)
@@ -4050,7 +4050,8 @@
             $userhead_w = 16;
         }
     } elsif ($u->is_identity) {
-        my $params = $u->identity->ljuser_display_params($u, $opts);
+        my $ident  = $u->identity;
+        my $params = $ident ? $ident->ljuser_display_params($u, $opts) : {};
         $userhead     = $params->{'userhead'}     || $userhead;
         $userhead_w   = $params->{'userhead_w'}   || $userhead_w;
         $userhead_h   = $params->{'userhead_h'}   || $userhead_h;
@@ -8079,8 +8080,8 @@
             # Identity
             if ( $u->is_identity ) {
                 $identity  = $u->identity;
-                my $params = $identity->ljuser_display_params($u, $opts);
-                $profile_url  = $params->{'profile_url'};
+                my $params = $identity ? $identity->ljuser_display_params($u, $opts) : {};
+                $profile_url  = $params->{'profile_url'}  || '';
                 $journal_url  = $params->{'journal_url'}  || $journal_url;
                 $journal_name = $params->{'journal_name'} || $journal_name;
             }

Tags: livejournal, pm, vad, 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 

  • 0 comments