From 1cfc6a8a2d27af276b6486664dbb0e4bed8e1d5f Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 21 Feb 2022 15:11:48 +0400 Subject: [PATCH] fix: review comments --- app/controllers/api/projects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 9463049668..70fbe0ea96 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -598,7 +598,7 @@ App::post('/v1/projects/:projectId/webhooks') throw new Exception('Project not found', 404); } - $security = ($security === '1' || $security === 'true' || $security === 1 || $security === true); + $security = (bool) filter_var($security, FILTER_VALIDATE_BOOLEAN); $webhook = new Document([ '$id' => $dbForConsole->getId(),