From 9eb4c93c1cbde92c778f4187f18f8b5dd3dd798d Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 27 Sep 2023 09:44:58 +0200 Subject: [PATCH] FIX add warning in the changelog --- ChangeLog | 2 ++ htdocs/core/class/commonobject.class.php | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0091c2c42a..f9ef3ac25b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -512,6 +512,8 @@ Following changes may create regressions for some external modules, but were nec * v14 seems to work correctly on PHP v8 but it generates a lot of verbose warnings. Currently, v14 i snot yet officialy supported with PHP 8. * To execute shell or command line command, your code must never use method like exec, shell_exec, popen, .. but must use the built-in method executeCLI() available into core/class/utils.class.php +* the trigger "*_DELETE_CONTACT" inside "delete_contact()" function from commonobject.class.php is call before delete the object element + and a $object->context['contact_id'] is now available for this trigger ***** ChangeLog for 13.0.5 compared to 13.0.4 ***** diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 0e980e4b05d..72603fdca95 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1172,12 +1172,11 @@ abstract class CommonObject $error = 0; - $this->context['contact_id'] = ((int) $rowid); - $this->db->begin(); if (!$error && empty($notrigger)) { // Call trigger + $this->context['contact_id'] = ((int) $rowid); $result = $this->call_trigger(strtoupper($this->element).'_DELETE_CONTACT', $user); if ($result < 0) { $error++;