• Hi,

    No push messages are sent because the data to be sent is no longer formatted correctly.

    The error is in the file front_endpoints.php, line 116, “‘data’ => array()” can be removed, so it should look like this:

         // prepare data
         $data = array(
             'to' => $tokens,
             'sound' => 'default',
             'title' => $notif->post_title,
             'body' => $notif->post_content
         );

    Can you please update the plugin?

    Best regards,
    Denis

Viewing 1 replies (of 1 total)
  • Thread Starter denisfoos

    (@denisfoos)

    Sorry, in my case I don’t need the data object, but maybe someone else does, so the default data value need to be an empty object instead of an empty array.

    Like this:

            // prepare data
            $data = array(
                'to' => $tokens,
                'sound' => 'default',
                'title' => $notif->post_title,
                'body' => $notif->post_content,
                'data' => (object) array(),
            );
Viewing 1 replies (of 1 total)
  • The topic ‘Validation error: must be of type object’ is closed to new replies.