From 714acbaa8b928892aae5e32a560b91935427bcb4 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Sat, 1 Apr 2023 08:30:19 -0400 Subject: [PATCH] Checking for Smarty credentials before sending API call for #391 --- api/smarty_streets.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/smarty_streets.php b/api/smarty_streets.php index 8b21a21..cd7dc70 100644 --- a/api/smarty_streets.php +++ b/api/smarty_streets.php @@ -30,7 +30,11 @@ class smarty_streets extends external_api { */ public function smarty_streets_api($address_string, $country) { // Smarty doesn't like this. - if(trim($address_string) === '') { + if( + trim($address_string) === '' || + $this->setting->get('smarty_streets_auth_id') === null || + $this->setting->get('smarty_streets_auth_token') === null + ) { return null; }