Skip to content

Commit

Permalink
Fixed undefined logger behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Radiergummi committed May 14, 2024
1 parent 7453a2f commit 2edb310
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Factories/ClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ public function createClient(array $config): Client
unset($config['servers']);
}

return ClientBuilder::fromConfig([
...$config,
'logger' => $this->logger,
]);
if ($this->logger !== null) {
$config['logger'] = $this->logger;
}

return ClientBuilder::fromConfig($config);
}
}

0 comments on commit 2edb310

Please sign in to comment.