jasonknight / woocommerce-json-api

A simple, Abstract JSON API for Wordpress' Awesome Plugin: WooCommerce
58 stars 21 forks source link

Server-side exception during set_categories #37

Closed michaelfranzl closed 11 years ago

michaelfranzl commented 11 years ago

Request:

{
  "action": "woocommerce_json_api",
  "proc": "set_categories",
  "arguments": {
    "token": "1234"
  },
  "payload": [
    {
      "id": {},
      "name": "catnme",
      "slug": "catslug",
      "group_id": "",
      "description": "desc",
      "parent_id": "",
      "count": "",
      "taxonomy": "",
      "taxonomy_id": ""
    }
  ]
}

Apache's error log shows:

 PHP Fatal error:  Call to a member function fromApiArray() on a non-object in /home/michael/Public/projects/woo/woocommerce-json-api/classes/API_VERSIONS/version1.php on line 847, referer: http://localhost/wp-content/plugins/woocommerce-json-api/tests/interface/
jasonknight commented 11 years ago

Okay, error handling was added into this code to check to see if the category is valid.