$type is mandatory

This commit is contained in:
Cédric 2019-11-14 22:26:15 +01:00 committed by GitHub
parent 100827ae0b
commit 0f907fbc29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -282,7 +282,7 @@ class Categories extends DolibarrApi
*
* @url GET /object/{type}/{id}
*/
public function getListForObject($id, $type = 'customer', $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0)
public function getListForObject($id, $type, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0)
{
// TODO add other types
if (!in_array($type, ['product'/*, 'member', 'customer', 'supplier', 'contact'*/])) {