Committer: vtroitsky
LJSUP-10937: Small fixes for border casesU 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 2012-02-02 07:12:51 UTC (rev 11394) +++ trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm 2012-02-02 09:12:26 UTC (rev 11395) @@ -27,7 +27,7 @@ } my $active_type = LJ::Request->get_param('type'); - $active_type = 'entry' unless $active_type =~ /(entry|journal|community)/; + $active_type = 'entry' unless ($active_type && $active_type =~ /(entry|journal|community)/); LJ::need_string('/shop/selfpromo.bml.confirm.delete.promoted'); LJ::need_string('/shop/selfpromo.bml.confirm.poster.cancel'); @@ -45,7 +45,7 @@ my $class = LJ::Pay::SelfPromo->get_class_by_type($type); # TODO (refactoring): encapsulate logic into PromoObject - my $buyout_cost = $class->buyout_cost; + my $buyout_cost = $class->buyout_cost; ## 12345678 --> 12 345 678 my $buyout_split = join ' ', ($buyout_cost =~ /^(.?.?.?)(...)*$/); my $ml_current_price = LJ::Lang::ml( '/shop/selfpromo.bml.current_price',