Skip to content

Commit 855fdd4

Browse files
author
Simon Foster
committed
fix: allow analytics to use the default api url if one isn't set
1 parent ce56815 commit 855fdd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Flagsmith.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function __construct(
104104
$this->environmentTtl = $environmentTtl ?? $this->environmentTtl;
105105
$this->enableLocalEvaluation = !is_null($environmentTtl);
106106
$this->retries = $retries ?? new Retry(3);
107-
$this->analyticsProcessor = $enableAnalytics ? new AnalyticsProcessor($apiKey, $host) : null;
107+
$this->analyticsProcessor = $enableAnalytics ? new AnalyticsProcessor($apiKey, $this->host) : null;
108108
$this->defaultFlagHandler = $defaultFlagHandler ?? $this->defaultFlagHandler;
109109

110110
//We default to using Guzzle for the HTTP client (as this is how it worked in 1.0)
@@ -146,7 +146,7 @@ public function withEnvironmentTtl(int $environmentTtl): self
146146

147147
/**
148148
* Build with enable Analytics.
149-
* @param bool $enableAnalytics
149+
* @param AnalyticsProcessor $enableAnalytics
150150
* @return Flagsmith
151151
*/
152152
public function withAnalytics(AnalyticsProcessor $analytics): self

0 commit comments

Comments
 (0)