diff --git a/src/NotificationHubsRest/Notification/AppleNotification.php b/src/NotificationHubsRest/Notification/AppleNotification.php index 1f02425..b6c5e12 100644 --- a/src/NotificationHubsRest/Notification/AppleNotification.php +++ b/src/NotificationHubsRest/Notification/AppleNotification.php @@ -60,7 +60,7 @@ public function getPayload() } if (is_array($this->alert)) { - if (!empty($alert)) { + if (!empty($this->alert)) { $alert = array_intersect_key($this->alert, array_fill_keys($this->supportedAlertProperties, 0)); $payload += ['alert' => $alert]; }