From a17c2346984309d8c893e0cc91646adba1f35212 Mon Sep 17 00:00:00 2001 From: om-ha <30494124+om-ha@users.noreply.github.com> Date: Sat, 28 Aug 2021 14:50:01 +0300 Subject: [PATCH] FIX Providers API incorrect `array_key_exists` - `array_key_exists` should search for they key `working_plan` within `$provider['settings']` and not `$provider['settings']['working_plan']` --- application/controllers/api/v1/Providers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/api/v1/Providers.php b/application/controllers/api/v1/Providers.php index a3739968..b6417d5b 100644 --- a/application/controllers/api/v1/Providers.php +++ b/application/controllers/api/v1/Providers.php @@ -102,7 +102,7 @@ class Providers extends API_V1_Controller { throw new Exception('No settings property provided.'); } - if ( ! array_key_exists('working_plan', $provider['settings']['working_plan'])) + if ( ! array_key_exists('working_plan', $provider['settings'])) { $provider['settings']['working_plan'] = $this->settings_model->get_setting('company_working_plan'); }