Merge pull request #6704 from monishdeb/46-test-fix
[civicrm-core.git] / api / v3 / MailingEventSubscribe.php
index ac82084461ed59a313f481c11ffe37decb832d3a..d3de2b2a6a77c6bbb1e82be3ec9a79d8c3859194 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -80,8 +80,14 @@ function civicrm_api3_mailing_event_subscribe_create($params) {
  *   Array of parameters determined by getfields.
  */
 function _civicrm_api3_mailing_event_subscribe_create_spec(&$params) {
-  $params['email']['api.required'] = 1;
-  $params['email']['title'] = 'Unsubscribe Email';
-  $params['group_id']['api.required'] = 1;
-  $params['group_id']['title'] = 'Unsubscribe From Group';
+  $params['email'] = array(
+    'api.required' => 1,
+    'title' => 'Unsubscribe Email',
+    'type' => CRM_Utils_Type::T_STRING,
+  );
+  $params['group_id'] = array(
+    'api.required' => 1,
+    'title' => 'Unsubscribe From Group',
+    'type' => CRM_Utils_Type::T_INT,
+  );
 }