Undefined offset: 1 in gcm_action_send_message() I am using Google Cloud Messaging for one of my projects. I think I have configured everything correctly. I am getting the following error when I tried to send some message. 


  Notice: Undefined offset: 1 in gcm_action_send_message()


I can't find any information in the module documentation.
I found the answer by looking the code used from the module.

function gcm_action_send_message($tokens, $keyValues, $delay_while_idle, $time_to_live, $collapse_key) {

    $gcm_message = array();
    foreach (explode(",", $keyValues) as $keyValue) {
      $temp = explode("=", $keyValue);
      $key = $temp[0];
      $value = $temp[1];
      if (isset($key) &amp;&amp; isset($value)) {
        $gcm_message[$key] = $value;
      }
    }
    gcm_send_message(array_unique(explode(',', $tokens)), $gcm_message, $delay_while_idle, $time_to_live, $collapse_key);
}


So we need to use for key-values a value like 0=[site:name], 1=[site:mail].