mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Fix the condition check of the "get_setting" method of providers, secretaries and admins (#1327)
This commit is contained in:
parent
59170af997
commit
cfe88f8901
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue