From 221b0eed38f03014a63986f494440708e199bf3b Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Fri, 26 Jan 2024 22:18:17 +0530 Subject: [PATCH] Add intVal check --- src/Appwrite/Platform/Workers/Webhooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Webhooks.php b/src/Appwrite/Platform/Workers/Webhooks.php index 2089c1c4d3..efbec3909b 100644 --- a/src/Appwrite/Platform/Workers/Webhooks.php +++ b/src/Appwrite/Platform/Workers/Webhooks.php @@ -156,7 +156,7 @@ class Webhooks extends Action $webhook->setAttribute('logs', $logs); - if ($attempts >= App::getEnv('_APP_WEBHOOK_MAX_FAILED_ATTEMPTS')) { + if ($attempts >= \intval(App::getEnv('_APP_WEBHOOK_MAX_FAILED_ATTEMPTS', '10'))) { $webhook->setAttribute('enabled', false); $this->sendEmailAlert($attempts, $statusCode, $webhook, $project, $dbForConsole, $queueForMails); }