Skip to content
Snippets Groups Projects
Commit a0cbf9bf authored by mattwire's avatar mattwire
Browse files

Fix some php warnings

parent f6e848a1
Branches
Tags
1 merge request!217Implement Stripe Checkout (with support for SEPA and ACH)
......@@ -53,8 +53,11 @@ class CRM_Stripe_Api {
return self::formatDate($stripeObject->created);
case 'invoice_id':
if (!isset($stripeObject->invoice)) {
return '';
}
// Handle both "expanded" and "collapsed" response
if (is_object($stripeObject->invoice)) {
elseif (is_object($stripeObject->invoice)) {
return (string) $stripeObject->invoice->id;
}
else {
......
......@@ -13,7 +13,10 @@ $customGroup = \Civi\Api4\CustomGroup::get(FALSE)
->addWhere('name', '=', 'Payment_details')
->execute()
->first();
if (!empty($customGroup)) {
if (empty($customGroup)) {
return [];
}
else {
return [
[
'name' => 'CustomGroup_Payment_details_CustomField_available_on',
......@@ -184,4 +187,4 @@ if (!empty($customGroup)) {
],
],
];
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment