diff --git a/application/models/Admins_model.php b/application/models/Admins_model.php index 5408a039..8d2813fa 100644 --- a/application/models/Admins_model.php +++ b/application/models/Admins_model.php @@ -496,7 +496,7 @@ class Admins_model extends EA_Model { { $settings = $this->db->get_where('user_settings', ['id_users' => $admin_id])->row_array(); - if (empty($settings)) + if ( ! array_key_exists($name, $settings)) { throw new RuntimeException('The requested setting value was not found: ' . $admin_id); } diff --git a/application/models/Providers_model.php b/application/models/Providers_model.php index 6b2777d3..21442dc4 100755 --- a/application/models/Providers_model.php +++ b/application/models/Providers_model.php @@ -541,7 +541,7 @@ class Providers_model extends EA_Model { { $settings = $this->db->get_where('user_settings', ['id_users' => $provider_id])->row_array(); - if (empty($settings[$name])) + if ( ! array_key_exists($name, $settings)) { throw new RuntimeException('The requested setting value was not found: ' . $provider_id); } diff --git a/application/models/Secretaries_model.php b/application/models/Secretaries_model.php index 741908d5..5a562c2d 100644 --- a/application/models/Secretaries_model.php +++ b/application/models/Secretaries_model.php @@ -518,7 +518,7 @@ class Secretaries_model extends EA_Model { { $settings = $this->db->get_where('user_settings', ['id_users' => $secretary_id])->row_array(); - if (empty($settings[$name])) + if ( ! array_key_exists($name, $settings)) { throw new RuntimeException('The requested setting value was not found: ' . $secretary_id); }