Skip to content

Commit

Permalink
Fix logic with merging defaultOptions with the passed array
Browse files Browse the repository at this point in the history
  • Loading branch information
Hectorhammett committed Sep 26, 2024
1 parent e8526d6 commit 573214b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ClientOptionsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ private function buildClientOptions(array $options)
];
}

// Keep track of the API Endpoint
$apiEndpoint = $options['apiEndpoint'] ?? null;

// Merge defaults into $options starting from top level
// variables, then going into deeper nesting, so that
// we will not encounter missing keys
$options += $defaultOptions;

// Keep track of the API Endpoint
$apiEndpoint = $options['apiEndpoint'] ?? null;

// If logger is explecitely set to false, logging is disabled
if ($options['logger'] !== false) {
$options['logger'] = $options['logger'] ?? ApplicationDefaultCredentials::getDefaultLogger();
Expand Down

0 comments on commit 573214b

Please sign in to comment.