diff --git a/src/Drivers/HttpDriver.php b/src/Drivers/HttpDriver.php index 6cf48d1..93a261b 100644 --- a/src/Drivers/HttpDriver.php +++ b/src/Drivers/HttpDriver.php @@ -16,7 +16,7 @@ public function sendSpan(Span $span) $promise = Http::async()->asJson() ->withHeaders($this->options['headers'] ?? []) - ->when($this->options['basic_auth'], function (Factory $client) { + ->when(isset($this->options['basic_auth']), function (Factory $client) { $client->withBasicAuth( $this->options['basic_auth']['username'], $this->options['basic_auth']['password'],