Skip to content

Commit

Permalink
Make sure orbit property values are string
Browse files Browse the repository at this point in the history
  • Loading branch information
PineappleIOnic committed Feb 20, 2024
1 parent 00d4bb1 commit 7660028
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Analytics/Adapter/Orbit.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function send(Event $event): bool
return json_encode($value);
}

return $value;
return strval($value);
}, array_filter($event->getProps(), fn ($value) => ! is_null($value) && $value !== '')),
];

Expand All @@ -95,7 +95,7 @@ public function send(Event $event): bool
/**
* Sets the client IP address.
*
* @param string $ip The IP address to use.
* @param string $ip The IP address to use.
*/
public function setClientIP(string $clientIP): self
{
Expand All @@ -105,7 +105,7 @@ public function setClientIP(string $clientIP): self
/**
* Sets the client user agent.
*
* @param string $userAgent The user agent to use.
* @param string $userAgent The user agent to use.
*/
public function setUserAgent(string $userAgent): self
{
Expand Down

0 comments on commit 7660028

Please sign in to comment.