Skip to content

Commit

Permalink
fix: πŸ› Handle null values
Browse files Browse the repository at this point in the history
  • Loading branch information
maicol07 committed Oct 28, 2021
1 parent d17607b commit 5d918bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ class Client
public function __construct(array $user_config)
{
$this->http_client = (new Factory())->withOptions([
'connect_timeout' => Arr::get($user_config, 'timeout', 0),
'connect_timeout' => Arr::get($user_config, 'timeout', 0) ?? 0,
'proxy' => Arr::get($user_config, 'http_proxy'),
'verify' => Arr::get($user_config, 'verify') ?: (Arr::get($user_config, 'cert_path', false))
'verify' => (Arr::get($user_config, 'verify', true) ?? true) ?: (Arr::get($user_config, 'cert_path', false) ?? false)
]);

// Auto discovery
Expand Down

0 comments on commit 5d918bd

Please sign in to comment.