Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[livejournal] r21704: LJSUP-11813: Error: Can't call method "p...

Committer: amyshkin
LJSUP-11813: Error: Can't call method "prop" on an undefined value at /home/lj/cgi-bin/LJ/Widget/EntryForm.pm line 112.
U   trunk/cgi-bin/LJ/Widget/EntryForm.pm
Modified: trunk/cgi-bin/LJ/Widget/EntryForm.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/EntryForm.pm	2012-04-12 11:28:16 UTC (rev 21703)
+++ trunk/cgi-bin/LJ/Widget/EntryForm.pm	2012-04-12 11:36:15 UTC (rev 21704)
@@ -108,6 +108,8 @@
 sub should_show_lastfm {
     my ($self) = @_;
 
+    return 0 unless $self->remote;
+
     if ( $LJ::DISABLED{'trava'} ) {
         return $self->remote->prop('last_fm_user') ? 1 : 0;
     }
@@ -120,7 +122,7 @@
     my ($self) = @_;
     return 0 if $LJ::DISABLED{'trava'};
     return 0 unless LJ::Setting::Music::Trava->good_ip;
-
+    return 1 unless $self->remote;
     my $me = $self->remote->prop('music_engine');
     return ! $me || $me eq LJ::Setting::Music::Trava->pkgkey ? 1 : 0;
 }

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