From eff01374b1163a8bf304f5c1a7a190bef44e5c43 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Thu, 15 Dec 2022 15:09:50 +0100 Subject: [PATCH] Change place of deleteobjectlinked in deletecommon function --- htdocs/core/class/commonobject.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index de19d651ba2..d7d41a545ef 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9455,6 +9455,12 @@ abstract class CommonObject } } + // Delete linked object + $res = $this->deleteObjectLinked(); + if ($res < 0) { + $error++; + } + if (!$error && !empty($this->isextrafieldmanaged)) { $result = $this->deleteExtraFields(); if ($result < 0) { @@ -9472,12 +9478,6 @@ abstract class CommonObject } } - // Delete linked object - $res = $this->deleteObjectLinked(); - if ($res < 0) { - $error++; - } - // Commit or rollback if ($error) { $this->db->rollback();