----------------------------------------
* CRM-19293: Dashboard options disappear after CiviContribute Component Settings save
https://issues.civicrm.org/jira/browse/CRM-19293
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;