diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index a7b78174cf1..f2357c96a16 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -550,7 +550,7 @@ class Thirdparties extends DolibarrApi { global $conf; - if (empty($conf->societe->enabled)) { + if (!isModEnabled('societe')) { throw new RestException(501, 'Module "Thirdparties" needed for this request'); }