sunnyman's (sunnyman) wrote in changelog,
sunnyman's
sunnyman
changelog

[ljcom] r11437: LJSUP-11192: Zero price correct output

Committer: vtroitsky
LJSUP-11192: Zero price correct output
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	2012-02-08 15:53:07 UTC (rev 11436)
+++ trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm	2012-02-08 15:55:18 UTC (rev 11437)
@@ -60,7 +60,7 @@
         my $current_price = $promo ? $promo->cost : 0;
 
         ## 12345678 --> 12 345 678
-        my $current_split = join ' ', grep { $_ } ($current_price =~ /^(.?.?.?)(...)*$/);
+        my $current_split = $current_price ? join ' ', grep { $_ } ($current_price =~ /^(.?.?.?)(...)*$/) : 0;
         my $ml_current_price = LJ::Lang::ml( '/shop/selfpromo.bml.current_price', { 'price' => $current_split } );
 
         foreach my $row (@$data_selfpromo) {

Tags: ljcom, pm, sunnyman, vtroitsky
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