Skip to content

Commit

Permalink
fix a warning in webhook trigger (Dolibarr#31850)
Browse files Browse the repository at this point in the history
* fix a warnign in webhook trigger

* better fix

---------

Co-authored-by: Hystepik <[email protected]>
Co-authored-by: Laurent Destailleur <[email protected]>
  • Loading branch information
3 people authored Nov 15, 2024
1 parent 3705d4a commit f80dd66
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit f80dd66

Please sign in to comment.