From 1ba03566dc20ed6851371db10fe8ec1dd426ca87 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jun 2020 02:15:02 +0200 Subject: [PATCH] Fix case of delete contact not correctly implemented. --- htdocs/core/class/commonobject.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 0f055d457ed..e104b82642d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8012,7 +8012,11 @@ abstract class CommonObject $error++; $this->errors[] = $this->error; } else { - $result = $this->delete($user); + if (get_class($this) == 'Contact') { // TODO special code because delete() for contact has not been standardized like other delete. + $result = $this->delete(); + } else { + $result = $this->delete($user); + } if ($result < 0) { $error++; $this->errors[] = $this->error;