From cd6f437c087f534772b5f40ba152993b006577f7 Mon Sep 17 00:00:00 2001 From: shaiful <802225+shaifulborhan@users.noreply.github.com> Date: Mon, 25 Nov 2024 22:29:06 +0800 Subject: [PATCH] Use strict comparison operator to check authentication type --- src/Infusionsoft/Infusionsoft.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Infusionsoft/Infusionsoft.php b/src/Infusionsoft/Infusionsoft.php index b6a2550..91fe31a 100644 --- a/src/Infusionsoft/Infusionsoft.php +++ b/src/Infusionsoft/Infusionsoft.php @@ -110,7 +110,7 @@ public function __construct($config = array()) } else if (isset($config['apikey'])) { $this->apikey = $config['apikey']; - if ( substr_compare($this->apikey, 'KeapAK', 0, strlen('KeapAK') ) ) { + if ( substr_compare($this->apikey, 'KeapAK', 0, strlen('KeapAK') ) === 0) { $this->authenticationType = AuthenticationType::ServiceAccountKey; } else { $this->authenticationType = AuthenticationType::LegacyKey;