Skip to content

Commit

Permalink
Replace getUsername/getPassword with getOption()
Browse files Browse the repository at this point in the history
  • Loading branch information
sfroemkenjw committed Jun 2, 2023
1 parent cbc8343 commit 75f8503
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Classes/System/Solr/SolrConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ protected function buildWriteService(): SolrWriteService
*/
protected function initializeClient(Client $client, string $endpointKey): Client
{
if (trim($this->getNode($endpointKey)->getUsername()) === '') {
if (trim($this->getNode($endpointKey)->getOption('username')) === '') {
return $client;
}

$username = $this->getNode($endpointKey)->getUsername();
$password = $this->getNode($endpointKey)->getPassword();
$username = $this->getNode($endpointKey)->getOption('username');
$password = $this->getNode($endpointKey)->getOption('password');
$this->setAuthenticationOnAllEndpoints($client, $username, $password);

return $client;
Expand Down Expand Up @@ -237,7 +237,7 @@ protected function getClient(string $endpointKey): Client
$client->getPlugin('postbigrequest');
$client->clearEndpoints();

$newEndpointOptions = $this->getNode($endpointKey)->getSolariumClientOptions();
$newEndpointOptions = $this->getNode($endpointKey)->getOptions();
$newEndpointOptions['key'] = $endpointKey;
$client->createEndpoint($newEndpointOptions, true);

Expand Down

0 comments on commit 75f8503

Please sign in to comment.