Skip to content

Commit

Permalink
Merge pull request #338 from shaifulborhan/patch-1
Browse files Browse the repository at this point in the history
Use strict comparison operator to check authentication type
  • Loading branch information
ROMzombie authored Nov 25, 2024
2 parents f9871a5 + cd6f437 commit a09d7ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Infusionsoft/Infusionsoft.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a09d7ab

Please sign in to comment.