diff --git a/app/workers/functions.php b/app/workers/functions.php index beed27018f..705d8e06ab 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -280,7 +280,7 @@ $server->job() /** Skip if a function has been triggered by its own execution */ $event = "functions.{$function->getId()}.executions.*"; - if(in_array($event, $events)) { + if (in_array($event, $events)) { Console::warning("Skipping function: {$function->getAttribute('name')} from project: {$project->getId()} triggered by self"); continue; } diff --git a/src/Appwrite/Event/Validator/Event.php b/src/Appwrite/Event/Validator/Event.php index c67d60055b..3f22900486 100644 --- a/src/Appwrite/Event/Validator/Event.php +++ b/src/Appwrite/Event/Validator/Event.php @@ -45,7 +45,7 @@ class Event extends Validator * Identify all sections of the pattern. */ $type = $parts[0] ?? false; - + if ($type == 'functions') { $this->message = 'Triggering a function on a function event is not allowed.'; return false;