public function onPreUninstall(CRM_Extension_Info $info) {
$customSearchesByName = $this->getCustomSearchesByName();
if (!array_key_exists($info->key, $customSearchesByName)) {
- CRM_Core_Error::fatal('This custom search is not registered.');
+ throw new CRM_Core_Exception('This custom search is not registered.');
}
$cs = $this->getCustomSearchesById();
$id = $cs[$customSearchesByName[$info->key]];
- $optionValue = CRM_Core_BAO_OptionValue::del($id);
+ CRM_Core_BAO_OptionValue::del($id);
return TRUE;
}