Fix #29797 add test on Target status (#29860)

Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
This commit is contained in:
Lucas Marcouiller 2024-06-06 23:32:19 +02:00 committed by GitHub
parent 9153636e02
commit 56d8564bce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;