Committer: anazarov
LJSUP-10285: Self promo. User gets incorrect error when he tries to promote entry with incorrect IDU 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, }, );