From c21df6433a66e74101418a969726747cc96207e7 Mon Sep 17 00:00:00 2001 From: i3 VM root account Date: Mon, 29 Jun 2015 09:04:17 -0400 Subject: [PATCH] test for undefined parameters causing https://github.com/elplatt/seltzer/issues/350 --- crm/modules/foxycart_payment/ipn.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crm/modules/foxycart_payment/ipn.php b/crm/modules/foxycart_payment/ipn.php index d16491a9..37f82bf1 100644 --- a/crm/modules/foxycart_payment/ipn.php +++ b/crm/modules/foxycart_payment/ipn.php @@ -118,8 +118,9 @@ // Parse the data and insert into the database // 'USD 12.34' goes to ['USD', '1234'] $parts = explode(' ', $product_price); -file_put_contents($debug, print_r($parts, true) . "\n", FILE_APPEND); -$payment_amount = payment_parse_currency($parts[1], $parts[0]); +if(isset($debug)) { + file_put_contents($debug, print_r($parts, true) . "\n", FILE_APPEND); +} // Determine cid $cid = ''; if (empty($cid)) {