Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r9849: LJSUP-7608 (user getting error when tryi...

Committer: ailyin
LJSUP-7608 (user getting error when trying to view payment history)
U   trunk/cgi-bin/LJ/Pay/LoyaltyUserpic.pm
Modified: trunk/cgi-bin/LJ/Pay/LoyaltyUserpic.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/LoyaltyUserpic.pm	2010-12-15 04:53:36 UTC (rev 9848)
+++ trunk/cgi-bin/LJ/Pay/LoyaltyUserpic.pm	2010-12-15 07:10:01 UTC (rev 9849)
@@ -498,8 +498,17 @@
 
                 my $cart_link = '';
                 if ($row->{piid}) {
-                    my $pi = LJ::Pay::Payment::PayItem->load($row->{'piid'});
+                    my $pi = eval {
+                        LJ::Pay::Payment::PayItem->load($row->{'piid'})
+                    };
 
+                    if ($@) {
+                        warn "couldn't load payitem data for " .
+                             "piid=$row->{'piid'}, skipping; " .
+                             "error details: " . $@;
+                        next;
+                    }
+
                     my $cart        = $pi->get_cart;
 
                     # do not link to carts the user cannot see

Tags: andy, ljcom, 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