Update societe.class.php

This commit is contained in:
Laurent Destailleur 2020-06-06 21:32:25 +02:00 committed by GitHub
parent a66926cf08
commit af440b7c49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1688,13 +1688,11 @@ class Societe extends CommonObject
$filepath=$deleteFromObject[1]; $filepath=$deleteFromObject[1];
$columnName=$deleteFromObject[2]; $columnName=$deleteFromObject[2];
if (dol_include_once($filepath)) { if (dol_include_once($filepath)) {
if (class_exists($className)) { $child_object = new $className($this->db);
$child_object = new $className($this->db); $result = $child_object->deleteByParentField($id, $columnName);
$result = $child_object->deleteByParentField($id, $columnName); if ($result < 0) {
if ($result < 0) { $error++;
$error++; $this->errors[] = $child_object->error;
$this->errors[] = $child_object->error;
}
} }
} else { } else {
$error++; $error++;