Merge branch '12.0' of github.com:Dolibarr/dolibarr into 12.0

This commit is contained in:
Florian HENRY 2020-12-24 00:49:14 +01:00
commit c438bf1a12

View File

@ -1241,6 +1241,16 @@ class Product extends CommonObject
}
}
// Remove extrafields
if (!$error)
{
$result = $this->deleteExtraFields();
if ($result < 0) {
$error++;
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
}
}
// Delete product
if (!$error) {
$sqlz = "DELETE FROM ".MAIN_DB_PREFIX."product";
@ -1268,16 +1278,6 @@ class Product extends CommonObject
}
}
// Remove extrafields
if (!$error)
{
$result = $this->deleteExtraFields();
if ($result < 0) {
$error++;
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
}
}
if (!$error) {
$this->db->commit();
return 1;