From c112f61195fb2e27b0ccd05d6f2fde2d825fd532 Mon Sep 17 00:00:00 2001 From: naomi <naomirosenberguk@gmail.com> Date: Mon, 4 Mar 2019 11:50:24 +0000 Subject: [PATCH] Ensure 'is_live' is always a boolean Without this, was getting a fatal error saying a parameter is not of type boolean, in test mode. --- CRM/Stripe/Customer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Stripe/Customer.php b/CRM/Stripe/Customer.php index 2f4badb8..67d821b4 100644 --- a/CRM/Stripe/Customer.php +++ b/CRM/Stripe/Customer.php @@ -22,9 +22,10 @@ class CRM_Stripe_Customer { } $queryParams = [ 1 => [$params['contact_id'], 'String'], - 2 => [$params['is_live'], 'Boolean'], + 2 => [$params['is_live'] ? 1 : 0, 'Boolean'], 3 => [$params['processor_id'], 'Positive'], ]; + return CRM_Core_DAO::singleValueQuery("SELECT id FROM civicrm_stripe_customers -- GitLab