X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FMailingContact.php;h=2ef5194da77674e0f6d8aff6f79fce69ba2b503c;hb=bbaa9fa6e0fb28919f0049cbb78796f53bec548c;hp=b3f2d8bb2608234716260d5a95d40f343820564c;hpb=2f36a39fa513d1bba497b5a540343d01308c99fb;p=civicrm-core.git diff --git a/api/v3/MailingContact.php b/api/v3/MailingContact.php index b3f2d8bb26..2ef5194da7 100644 --- a/api/v3/MailingContact.php +++ b/api/v3/MailingContact.php @@ -43,6 +43,9 @@ function _civicrm_api3_mailing_contact_getresults($params, $count) { } $options = _civicrm_api3_get_options_from_params($params, TRUE, 'contribution', 'get'); $fnName = '_civicrm_api3_mailing_contact_get_' . strtolower($params['type']); + if (!function_exists($fnName)) { + throw new API_Exception('Invalid mailing type: ' . $params['type']); + } return $fnName( $params['contact_id'], $options['offset'], @@ -81,13 +84,13 @@ function _civicrm_api3_mailing_contact_get_spec(&$params) { * Helper function for mailing contact queries. * * @param int $contactID - * @param $offset - * @param $limit - * @param $selectFields - * @param $fromClause - * @param $whereClause - * @param $sort - * @param $getCount + * @param int $offset + * @param int $limit + * @param array|null $selectFields + * @param string|null $fromClause + * @param string|null $whereClause + * @param string|null $sort + * @param bool $getCount * * @return array */ @@ -193,10 +196,10 @@ LIMIT %2, %3 * Get delivered mailing contacts. * * @param int $contactID - * @param $offset - * @param $limit - * @param $sort - * @param $getCount + * @param int $offset + * @param int $limit + * @param string|null $sort + * @param bool $getCount * * @return array */ @@ -234,10 +237,10 @@ AND meb.id IS NULL * Get bounced mailing contact records. * * @param int $contactID - * @param $offset - * @param $limit - * @param $sort - * @param $getCount + * @param int $offset + * @param int $limit + * @param string|null $sort + * @param bool $getCount * * @return array */