From e97e93294386e8085e02d5afa0342bd5bfb48327 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 2 Aug 2018 13:45:05 -0400 Subject: [PATCH] Update for php notices update code to get rid of notices. --- classes/billingSupport.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/billingSupport.php b/classes/billingSupport.php index 023280e..a0fb635 100644 --- a/classes/billingSupport.php +++ b/classes/billingSupport.php @@ -1577,15 +1577,15 @@ class GlmBillingSupport $billingFields = $billingAccount->fields; if ( $billingFields ) { foreach( $billingFields as $field_name => $field ) { - if ( $field['required'] ) { + if ( isset( $field['required'] ) && $field['required'] ) { $required_fields[] = $field_name; } } } // Check to see if using contact or business address for billing - $contact_use_billing = filter_var( $_REQUEST['contact_use_billing'], FILTER_VALIDATE_BOOLEAN ); - $business_use_billing = filter_var( $_REQUEST['business_use_billing'], FILTER_VALIDATE_BOOLEAN ); - $use_billing = filter_var( $_REQUEST['use_billing'], FILTER_VALIDATE_BOOLEAN ); + $contact_use_billing = isset( $_REQUEST['contact_use_billing'] ) ? filter_var( $_REQUEST['contact_use_billing'], FILTER_VALIDATE_BOOLEAN ) : false; + $business_use_billing = isset( $_REQUEST['business_use_billing'] ) ? filter_var( $_REQUEST['business_use_billing'], FILTER_VALIDATE_BOOLEAN ) : false; + $use_billing = isset( $_REQUEST['use_billing'] ) ? filter_var( $_REQUEST['use_billing'], FILTER_VALIDATE_BOOLEAN ) : false; if ( $contact_use_billing ) { // Need to convert city to String $city_id = filter_var( $_REQUEST['city'], FILTER_VALIDATE_INT ); @@ -1680,7 +1680,7 @@ class GlmBillingSupport } // Check the given $ref_dest $member_id = filter_var( $ref_dest, FILTER_VALIDATE_INT ); - if ( $member_id && $billing_updated && $billing_updated_format ) { + if ( $member_id && isset( $billing_updated ) && $billing_updated && isset( $billing_updated_format ) && $billing_updated_format ) { // Get the members account $account = $this->getAccountByRefDest( $member_id ); -- 2.17.1