diff --git a/CRM/Civiquickbooks/Page/OAuthQBO.php b/CRM/Civiquickbooks/Page/OAuthQBO.php index 9a9e99f..04eb253 100644 --- a/CRM/Civiquickbooks/Page/OAuthQBO.php +++ b/CRM/Civiquickbooks/Page/OAuthQBO.php @@ -108,7 +108,7 @@ public function run() { $_company_country = $companyInfo->Country; //if getting no response, set country settings as AU company. - $_company_country = (isset($_company_country['CompanyInfo'])) ? $_company_country['CompanyInfo']['Country'] : 'AU'; + $_company_country = (!empty($_company_country)) ? $_company_country : 'AU'; try { civicrm_api3('Setting', 'create', ['quickbooks_company_country' => $_company_country]);