From e83c2025b6453a0f2cb2fe954de2193df7e0fa3e Mon Sep 17 00:00:00 2001 From: steveeakin Date: Tue, 13 Apr 2021 12:41:14 -0400 Subject: [PATCH] Fixing url-args to fit for Safari notifications. They want an array of values. --- src/Payload.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Payload.php b/src/Payload.php index 85b3d3f..ed4729f 100644 --- a/src/Payload.php +++ b/src/Payload.php @@ -466,7 +466,11 @@ public function jsonSerialize() } if (is_array($this->urlArgs)) { - $payload[self::PAYLOAD_ROOT_KEY]->{self::PAYLOAD_URL_ARGS_KEY} = $this->urlArgs; + $payload[self::PAYLOAD_ROOT_KEY]->{self::PAYLOAD_URL_ARGS_KEY} = []; + + foreach ($this->urlArgs as $key => $arg) { + $payload[self::PAYLOAD_ROOT_KEY]->{self::PAYLOAD_URL_ARGS_KEY}[] = $arg; + } } if (is_countable($this->customValues) && count($this->customValues)) {