Alexander Nazarov (nfokz) wrote in changelog,
Alexander Nazarov
nfokz
changelog

[ljcom] r11140: LJSUP-10285: Self promo. User gets incor...

Committer: anazarov
LJSUP-10285: Self promo. User gets incorrect error when he tries to promote entry with incorrect ID
U   trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm
Modified: trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm	2011-11-02 09:24:42 UTC (rev 11139)
+++ trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm	2011-11-02 10:18:10 UTC (rev 11140)
@@ -145,11 +145,14 @@
         my $ml_var = '/shop/selfpromo.bml.error.entry_ineligible.'
             . $ineligible_reason;
 
+        my $poster  = $entry->poster?  $entry->poster->ljuser_display  : undef;
+        my $journal = $entry->journal? $entry->journal->ljuser_display : undef;
+
         my $message = LJ::Lang::ml(
             $ml_var,
             {   'entry_url'      => $entry_url,
-                'journal_ljuser' => $entry->journal->ljuser_display,
-                'poster_ljuser'  => $entry->poster->ljuser_display,
+                'journal_ljuser' => $journal,
+                'poster_ljuser'  => $poster,
             },
         );
 

Tags: anazarov, ljcom, nfokz, pm
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