diff --git a/src/Payload.php b/src/Payload.php index 4994b05..ce4b4b0 100644 --- a/src/Payload.php +++ b/src/Payload.php @@ -348,7 +348,7 @@ public function jsonSerialize() $payload[self::PAYLOAD_ROOT_KEY][self::PAYLOAD_THREAD_ID_KEY] = $this->threadId; } - if (count($this->customValues)) { + if ((is_array($this->customValues) || $this->customValues instanceof Countable) && count($this->customValues)) { $payload = array_merge($payload, $this->customValues); }