From 8077138de82b17d227abc8c6186178e8204de227 Mon Sep 17 00:00:00 2001 From: yashodha Date: Thu, 1 Sep 2016 15:43:30 +0530 Subject: [PATCH] CRM-19293: Dashboard options disappear after CiviContribute Component Settings save ---------------------------------------- * CRM-19293: Dashboard options disappear after CiviContribute Component Settings save https://issues.civicrm.org/jira/browse/CRM-19293 --- CRM/Admin/Form/Preferences/Contribute.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Admin/Form/Preferences/Contribute.php b/CRM/Admin/Form/Preferences/Contribute.php index 3d484f7541..d8a1030388 100644 --- a/CRM/Admin/Form/Preferences/Contribute.php +++ b/CRM/Admin/Form/Preferences/Contribute.php @@ -248,7 +248,9 @@ class CRM_Admin_Form_Preferences_Contribute extends CRM_Admin_Form_Preferences { else { $setting = explode(CRM_Core_DAO::VALUE_SEPARATOR, substr($values['user_dashboard_options'], 1, -1)); $invoiceKey = array_search($setKey, $setting); - unset($setting[$invoiceKey]); + if (!empty($invoiceKey)) { + unset($setting[$invoiceKey]); + } $settingName = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR, array_values($setting)) . CRM_Core_DAO::VALUE_SEPARATOR; -- 2.25.1