From 3bc63c43dc0c0f4d47d26b040490d370dc0221ba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Apr 2014 21:25:26 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20[=20bug=20#1322=20]=20notification=20d'e?= =?UTF-8?q?rreur=20en=20ins=C3=A9rant=20ou=20supprimer=20un=20tiers=20dans?= =?UTF-8?q?=20une=20cat=C3=A9gorie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interface_50_modMailmanspip_Mailmanspipsynchro.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php index 17ba4b11f4f..77318bee795 100644 --- a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php @@ -142,7 +142,7 @@ class InterfaceMailmanSpipsynchro dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); // We add subscription if we change category (new category may means more mailing-list to subscribe) - if ($object->linkto->add_to_abo() < 0) + if (is_object($object->linkto) && method_exists($object->linkto, 'add_to_abo') && $object->linkto->add_to_abo() < 0) { $this->error=$object->linkto->error; $this->errors=$object->linkto->errors; @@ -160,7 +160,7 @@ class InterfaceMailmanSpipsynchro dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); // We remove subscription if we change category (lessw category may means less mailing-list to subscribe) - if ($object->unlinkoff->del_to_abo() < 0) + if (is_object($object->unlinkoff) && method_exists($object->unlinkoff, 'del_to_abo') && $object->unlinkoff->del_to_abo() < 0) { $this->error=$object->unlinkoff->error; $this->errors=$object->unlinkoff->errors;