From 56d8564bceeb44908a234a5d56c16d913db0aff5 Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com> Date: Thu, 6 Jun 2024 23:32:19 +0200 Subject: [PATCH] Fix #29797 add test on Target status (#29860) Co-authored-by: Hystepik --- .../triggers/interface_95_modWebhook_WebhookTriggers.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php index 6604764e1c4..304efb85770 100644 --- a/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php +++ b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php @@ -78,7 +78,7 @@ class InterfaceWebhookTriggers extends DolibarrTriggers $target_url = $static_object->fetchAll(); foreach ($target_url as $key => $tmpobject) { $actionarray = explode(",", $tmpobject->trigger_codes); - if (is_array($actionarray) && in_array($action, $actionarray)) { + if ($tmpobject->status == Target::STATUS_VALIDATED && is_array($actionarray) && in_array($action, $actionarray)) { // Build the answer object $resobject = new stdClass(); $resobject->triggercode = $action;