Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 5610d92

Browse files
Bugfix: Only filter NULL values on toArray
Resolving issue when trying to reset badge count (badge=0)
1 parent 2122ba0 commit 5610d92

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Message/PayloadNotification.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ public function toArray()
137137
];
138138

139139
// remove null values
140-
$notification = array_filter($notification);
141-
140+
$notification = array_filter($notification, function($value) {
141+
return $value !== null;
142+
});
143+
142144
return $notification;
143145
}
144146
}

0 commit comments

Comments
 (0)