журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[ljcom] r12496: LJSUP-13345: Error when run worker pay-b...

Committer: nnikulochkina
LJSUP-13345: Error when run worker pay-blocking
U   trunk/cgi-bin/LJ/Pay/Payment.pm
Modified: trunk/cgi-bin/LJ/Pay/Payment.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/Payment.pm	2012-08-20 08:25:44 UTC (rev 12495)
+++ trunk/cgi-bin/LJ/Pay/Payment.pm	2012-08-20 10:11:40 UTC (rev 12496)
@@ -541,8 +541,12 @@
           )
         or return undef;
 
-    $cartobj->payvar_append("creator_ip", LJ::get_remote_ip());
+    # local IP 127.0.0.1 indicates that cart was created in non-web context
+    # (for example, from worker)
+    my $creator_ip = LJ::get_remote_ip() || '127.0.0.1';
 
+    $cartobj->payvar_append("creator_ip", $creator_ip);
+
     return $cartobj;
 }
 

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