Skip to content

Commit

Permalink
chore: Update Client.php to handle null port values in cachedHostsAnd…
Browse files Browse the repository at this point in the history
…Ports
  • Loading branch information
marcochavezf committed Aug 21, 2024
1 parent ab10b11 commit b44f4c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ private function getPossibleHosts(?string $preferredHost, bool $resetHosts = fal
// If the hosts and ports in the cache don't match the ones in the config, reset the cache.
$cachedHostsAndPorts = [];
foreach ($cachedHostConfigs as $hostName => $config) {
$cachedHostsAndPorts[$hostName] = $config['port'];
$cachedHostsAndPorts[$hostName] = $config['port'] ?? null;
}
asort($cachedHostsAndPorts);
$uncachedHostsAndPort = [];
Expand Down

0 comments on commit b44f4c7

Please sign in to comment.