diff --git a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php index 5b746b971cb..cb98232addc 100644 --- a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php @@ -1,7 +1,8 @@ * Copyright (C) 2014 Marcos García - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Rafael San José * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -115,7 +116,7 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers // Add user into some linked tools (mailman, spip, etc...) if (($object->oldcopy->email != $object->email) || ($object->oldcopy->typeid != $object->typeid)) { if (is_object($object->oldcopy) && (($object->oldcopy->email != $object->email) || ($object->oldcopy->typeid != $object->typeid))) { // If email has changed or if list has changed we delete mailman subscription for old email - if ($object->oldcopy->del_to_abo() < 0) { + if (method_exists($object->oldcopy, 'del_to_abo') && $object->oldcopy->del_to_abo() < 0) { $this->errors = $object->oldcopy->errors; if (!empty($object->oldcopy->error)) { $this->errors[] = $object->oldcopy->error;