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();