From 7660028514cd624a21566f583d70bc9c53f36167 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Tue, 20 Feb 2024 14:43:34 +0000 Subject: [PATCH] Make sure orbit property values are string --- src/Analytics/Adapter/Orbit.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Analytics/Adapter/Orbit.php b/src/Analytics/Adapter/Orbit.php index 33477ce..7f1e44a 100644 --- a/src/Analytics/Adapter/Orbit.php +++ b/src/Analytics/Adapter/Orbit.php @@ -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 !== '')), ]; @@ -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 { @@ -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 {