From 6aef38a6583b09827cdc6cf1727deb88b8c6c1b3 Mon Sep 17 00:00:00 2001 From: Alan Dixon Date: Thu, 18 Mar 2021 14:49:41 +0000 Subject: [PATCH] Fix display of empty expiry date, issue #342 --- iats.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iats.php b/iats.php index ee5a6023..8f253aa1 100644 --- a/iats.php +++ b/iats.php @@ -431,7 +431,7 @@ function iats_civicrm_pageRun_CRM_Contribute_Page_ContributionRecur($page) { 'reset=1&cid=' . $recur['contact_id'] . '&customerCode=' . $customer_code . '&paymentProcessorId=' . $recur['payment_processor_id'] . '&crid=' . $crid . '&is_test=' . $recur['is_test']); $extra['customerLink'] .= " | Process"; $expiry = $payment_token['expiry_date']; - $extra['expiry'] = date('Y-m', strtotime($expiry)); + $extra['expiry'] = empty($expiry) ? 'N/A' : date('Y-m', strtotime($expiry)); } } catch (CiviCRM_API3_Exception $e) {