From 9dc98563e78cdc29802c4f8ec2be3a770753f1b5 Mon Sep 17 00:00:00 2001 From: objecttothis Date: Wed, 15 Feb 2023 00:03:41 +0400 Subject: [PATCH] Fixed undefined variable before use. --- app/Config/Validation/OSPOSRules.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Config/Validation/OSPOSRules.php b/app/Config/Validation/OSPOSRules.php index 6fc244f87..0976005ee 100644 --- a/app/Config/Validation/OSPOSRules.php +++ b/app/Config/Validation/OSPOSRules.php @@ -24,6 +24,7 @@ class OSPOSRules { $this->employee = model('Employee'); $this->request = Services::request(); + $config = config('OSPOS')->settings; //Installation Check if(!$this->installation_check()) @@ -42,8 +43,9 @@ class OSPOSRules return false; } + //GCaptcha Check - $gcaptcha_enabled = array_key_exists('gcaptcha_enable', config('OSPOS')->settings) + $gcaptcha_enabled = array_key_exists('gcaptcha_enable', $config) ? $config['gcaptcha_enable'] : false;