From 55da3cc16cbdb7a4d8313337ce118ed9afc60b49 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Thu, 26 Feb 2026 14:19:56 +0530 Subject: [PATCH] FIX_ISSUE --- app/Controllers/RestAuthenticationController.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 04bb4cb..78ee61e 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -158,8 +158,8 @@ class RestAuthenticationController extends AdminController } $otp = random_int(100000, 999999); - $default_otp = env('DEFAULT_OTP'); - $is_send_sms_otp = env('IS_SEND_SMS_OTP'); + $default_otp = env('DEFAULT_OTP') ?? ''; + $is_send_sms_otp = filter_var(env('IS_SEND_SMS_OTP') ?? true, FILTER_VALIDATE_BOOLEAN); if(!empty($default_otp)){ $otp = $default_otp; @@ -283,8 +283,8 @@ class RestAuthenticationController extends AdminController $otp = random_int(100000, 999999); - $default_otp = env('DEFAULT_OTP'); - $is_send_email_otp = env('IS_SEND_EMAIL_OTP'); + $default_otp = env('DEFAULT_OTP') ?? ''; + $is_send_email_otp = filter_var(env('IS_SEND_EMAIL_OTP') ?? true, FILTER_VALIDATE_BOOLEAN); if(!empty($default_otp)){ $otp = $default_otp; @@ -616,8 +616,8 @@ class RestAuthenticationController extends AdminController $otp = random_int(100000, 999999); - $default_otp = env('DEFAULT_OTP'); - $is_send_sms_otp = env('IS_SEND_SMS_OTP'); + $default_otp = env('DEFAULT_OTP') ?? ''; + $is_send_sms_otp = filter_var(env('IS_SEND_SMS_OTP') ?? true, FILTER_VALIDATE_BOOLEAN); if(!empty($default_otp)){ $otp = $default_otp; @@ -694,8 +694,8 @@ class RestAuthenticationController extends AdminController $otp = random_int(100000, 999999); - $default_otp = env('DEFAULT_OTP'); - $is_send_email_otp = env('IS_SEND_EMAIL_OTP'); + $default_otp = env('DEFAULT_OTP') ?? ''; + $is_send_email_otp = filter_var(env('IS_SEND_EMAIL_OTP') ?? true, FILTER_VALIDATE_BOOLEAN); if(!empty($default_otp)){ $otp = $default_otp;