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];
$columnName=$deleteFromObject[2];
if (dol_include_once($filepath)) {
if (class_exists($className)) {
$child_object = new $className($this->db);
$result = $child_object->deleteByParentField($id, $columnName);
if ($result < 0) {
$error++;
$this->errors[] = $child_object->error;
}
$child_object = new $className($this->db);
$result = $child_object->deleteByParentField($id, $columnName);
if ($result < 0) {
$error++;
$this->errors[] = $child_object->error;
}
} else {
$error++;