fix : Undefined property: stdClass:: in C:\wamp64\www\dolibarr-140\htdocs\core\class\commonobject.class.php on line 1705

This commit is contained in:
Philippe GRAND 2021-08-22 19:47:06 +02:00
parent 2e3b9fce49
commit 538b2e2a5f

View File

@ -1701,7 +1701,7 @@ abstract class CommonObject
$idtype = $this->barcode_type;
if (empty($idtype) && $idtype != '0') { // If type of barcode no set, we try to guess. If set to '0' it means we forced to have type remain not defined
if ($this->element == 'product') {
if ($this->element == 'product' && !empty($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE)) {
$idtype = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE;
} elseif ($this->element == 'societe') {
$idtype = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY;