bpolaszek / webpush-bundle

Symfony Bundle: Send WebPush Notifications to your users.
MIT License
66 stars 40 forks source link

jsonSerialize bug #17

Open deivid11 opened 5 years ago

deivid11 commented 5 years ago

Hello, first of all thanks for this bundle. Im trying to send a notification with a link but when jsonSerialize is called it tries to convert an array to string and PHP sends a Notice, It is because array_diff works only with one dimension array. Here is my notification message.

 $pushNotification = new PushNotification($notification->getHtml(), [
                PushNotification::ICON => '/favicon.ico',
                PushNotification::DATA => ['link'=>$notification->getLink()],
                PushNotification::TAG => $notification->getGroupName()
            ]);
deivid11 commented 5 years ago

I submitted a pull request #18