when you use addRecepient() function to send to no recepient, like if you'r using it in a foreach loop you may have a php errors.
" shown in the attached images " from these two lines in the gcm lib
$this->payload['registration_ids'] = array_unique($this->payload['registration_ids']);
sort($this->payload['registration_ids']);
i solved this by adding
if(isset($this->payload['registration_ids']))
before them .

when you use addRecepient() function to send to no recepient, like if you'r using it in a foreach loop you may have a php errors.
" shown in the attached images " from these two lines in the gcm lib
$this->payload['registration_ids'] = array_unique($this->payload['registration_ids']);sort($this->payload['registration_ids']);i solved this by adding

if(isset($this->payload['registration_ids']))before them .