From 5b28e7c478fe4630cf82e3c0e7d8aef2db7acdb4 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 17 Jan 2025 11:48:19 +0000 Subject: [PATCH] chore: review comments --- app/controllers/shared/api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 592c7b8a49..2f094e33ef 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -76,7 +76,7 @@ $eventDatabaseListener = function (Document $project, Document $document, Respon /** Trigger webhooks events only if a project has them enabled */ - if ($project->getAttribute('webhooks', []) !== []) { + if (!empty($project->getAttribute('webhooks'))) { $queueForWebhooks ->from($queueForEvents) ->trigger(); @@ -697,7 +697,7 @@ App::shutdown() * But it might have performance implications on the API due to the number of webhooks etc. * Some profiling is needed to see if this is a problem. */ - if ($project->getAttribute('webhooks', []) !== []) { + if (!empty($project->getAttribute('webhooks'))) { $queueForWebhooks ->from($queueForEvents) ->trigger();