diff --git a/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php index 1ae1e322ea044..2d16d54ed99aa 100644 --- a/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php +++ b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php @@ -76,6 +76,9 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf $errors = 0; $static_object = new Target($this->db); $target_url = $static_object->fetchAll(); + if (!is_array($target_url)) { + return 0; + } foreach ($target_url as $key => $tmpobject) { $actionarray = explode(",", $tmpobject->trigger_codes); if ($tmpobject->status == Target::STATUS_VALIDATED && is_array($actionarray) && in_array($action, $actionarray)) {