ardhityawiedhairawan / Push-Notifications-Android-With-php-Server

Simple push notification Android with Firebase. Sending message with php server.
4 stars 6 forks source link

FCM #1

Open Venkysuba opened 6 years ago

Venkysuba commented 6 years ago

While i'm trying to send message through registered device it's shows following error... Notice: Trying to get property of non-object in C:\wamp64\www\fcm_server\send.php on line 43 Here i have attached the code below line.no 43--> if($result->success){ header('Location: sendNotification.php?success'); }else{ echo "

";print_r($result);die;
}
}else{
header('Location: sendNotification.php');
}

ardhityawiedhairawan commented 6 years ago

That is notice, I think variable $result is empty. Please try catch that variable, make sure that is not empty before proceed it.

Thank