title: Whatsapp.php shows JSON/XML error
body: <p>I am using whatsapi from github and  the examples/whatsapp.php. I have configured my number, password etc properly...</p>
  
  <p>however, when i execute the program, after logging in, when i try to select user which is supposed to get my contacts and groups, JS error 'Error: There was an error with the AJAX request. XML/Json format is bad.' comes up.</p>
  
  <p>On checking firbug console, i got the following php error message;</p>
  
  <p><br />
  <b>Notice</b>:  Undefined index: id in <b>C:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\Landshoppe
  \WAPP\Chat-API-master\examples\whatsapp.php</b> on line <b>321</b><br />
  {"success":true,"type":"contacts","data":.... </p>
  
  <p>The function which calls it is</p>
  
  <pre><code>public function __construct(array $config)
  {
      $this-&gt;config = $config;
  
      if ($_SERVER['REQUEST_METHOD'] == "POST") {
          try {
              $this-&gt;inputs = $this-&gt;cleanPostInputs();
  
              if (isset($this-&gt;inputs['from'])) {
                  $this-&gt;from = $this-&gt;inputs['from'];
  
                  if (!array_key_exists($this-&gt;from, $this-&gt;config)) {
                      exit(json_encode(array(
                          "success" =&gt; false,
                          'type' =&gt; 'contacts',
                          "errormsg" =&gt; "No config settings for user  $this-&gt;from could be found"
                      )));
                  } else {
                      $this-&gt;number = $this-&gt;config[$this-&gt;from]['fromNumber'];
  //  --This is the Line--   $this-&gt;id = $this-&gt;config[$this-&gt;from]['id'];
                      $this-&gt;nick = $this-&gt;config[$this-&gt;from]['nick'];
                      $this-&gt;password = $this-&gt;config[$this-&gt;from]['waPassword'];
  
                      $this-&gt;wa = new WhatsProt($this-&gt;number, $this-&gt;nick, false);
                      $this-&gt;wa-&gt;eventManager()-&gt;bind('onGetMessage', array($this, 'processReceivedMessage'));
                      $this-&gt;wa-&gt;eventManager()-&gt;bind('onConnect', array($this, 'connected'));
                      $this-&gt;wa-&gt;eventManager()-&gt;bind('onGetGroups', array($this, 'processGroupArray'));
                  }
              }
          } catch (Exception $e) {
              exit(json_encode(array(
                  "success" =&gt; false,
                  'type' =&gt; 'contacts',
                  "errormsg" =&gt; $e-&gt;getMessage()
              )));
          }
      }
  }
  </code></pre>
  
  <p>after that all groups and contacts are defined therein ! but program is paused with the JSON error !</p>
  
  <p>So what should i do to rectify the 'undefined index id' ?</p>