}
$this->_options = CRM_Core_SelectValues::getDedupeRuleTypes();
$this->_rgid = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0);
+
+ // check if $contactType is valid
$contactTypes = civicrm_api3('Contact', 'getOptions', array('field' => "contact_type", 'context' => "validate"));
$contactType = CRM_Utils_Request::retrieve('contact_type', 'String', $this, FALSE, 0);
if (CRM_Utils_Array::value($contactType, $contactTypes['values'])) {
- $this->_contactType = CRM_Utils_Array::value($contactType, $contactTypes['values']);
+ $this->_contactType = $contactType;
}
elseif (!empty($contactType)) {
throw new CRM_Core_Exception('Contact Type is Not valid');