[Legacy] Add null check to SavedSearch bean

- Add check to fill_in_additional_list_fields
-- Check if search_module is defined in contents otherwise set default
This commit is contained in:
Clemente Raposo 2021-04-21 17:33:45 +01:00 committed by Dillon-Brown
parent bead68312e
commit c4fb0bacf8

View file

@ -480,7 +480,8 @@ class SavedSearch extends SugarBean
{
global $app_list_strings;
// Fill in the assigned_user_name
$this->search_module = $app_list_strings['moduleList'][$this->contents['search_module']];
$searchModule = $this->contents['search_module'] ?? '';
$this->search_module = $app_list_strings['moduleList'][$searchModule] ?? '';
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
}