1
0
mirror of https://github.com/beestat/app.git synced 2025-05-23 18:04:14 -04:00

Checking for Smarty credentials before sending API call for #391

This commit is contained in:
Jon Ziebell 2023-04-01 08:30:19 -04:00
parent b9b39495a5
commit 714acbaa8b

View File

@ -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;
}