diff --git a/src/Client.php b/src/Client.php index c1ded5e..675f39c 100644 --- a/src/Client.php +++ b/src/Client.php @@ -77,9 +77,7 @@ public function send($data, array $registrationIds = [], array $options = []) { $this->responses = []; - $data = array_merge($options, [ - 'data' => $data, - ]); + $data = !empty($data) ? array_merge($options, array('data' => $data)) : $options; if (isset($options['to'])) { $this->responses[] = $this->browser->post($this->apiUrl, $this->getHeaders(), json_encode($data));