title: "get_object_vars() expects parameter 1 to be object, string given"
body: <p>Got this error: </p>
  
  <pre><code>login: demo
  password: ****
  [AJAX] Invalid JSON - Server reponse is: 
  &lt;br /&gt;
  &lt;b&gt;Warning&lt;/b&gt;:  get_object_vars() expects parameter 1 to be object, string given in &lt;b&gt;C:\wamp\www\examples\json-rpc\json-rpc.php&lt;/b&gt; on line &lt;b&gt;75&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;
  &lt;b&gt;Warning&lt;/b&gt;:  get_object_vars() expects parameter 1 to be object, string given in &lt;b&gt;C:\wamp\www\examples\json-rpc\json-rpc.php&lt;/b&gt; on line &lt;b&gt;75&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;
  &lt;b&gt;Warning&lt;/b&gt;:  get_object_vars() expects parameter 1 to be object, string given in &lt;b&gt;C:\wamp\www\examples\json-rpc\json-rpc.php&lt;/b&gt; on line &lt;b&gt;75&lt;/b&gt;&lt;br /&gt;
  {"jsonrpc":"2.0","result":null,"id":"2","error":{"code":-32600,"message":"Invalid Request: no method"}}
  </code></pre>
  
  <p>In the actual file it's referring to it says </p>
  
  <pre><code>// return object field if exist otherwise return default value
  function get_field($object, $field, $default) {
    $array = get_object_vars($object);
    if (isset($array[$field])) {
      return $array[$field];
    } else {
      return $default;
    }
  }
  </code></pre>
  
  <p>Can I just change it to "get_string_vars"? Or does it have to stay an object to do with the passwords? I'm a bit of a noob, just working on a project, thanks. </p>