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