From af440b7c49cdf3a098a7dc3a2239a4dc6520e4a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 6 Jun 2020 21:32:25 +0200 Subject: [PATCH] Update societe.class.php --- htdocs/societe/class/societe.class.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 12280843b2a..0ad6ab22f23 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -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++;