From 9d33294e51d2b8c07451938ce48f77beaa805ab2 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 14 Sep 2016 13:52:46 -0700 Subject: [PATCH] CRM-17789 - api/v3/ReportTemplate - Indicate type correctly The return value of `civicrm_api*()` is generally `array`, but when used with `getvalue` it can be scalar (specifically, `string` in this case). This produces a type-warning in phan because it cannot tell that the true return type is `string`. --- api/v3/ReportTemplate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/ReportTemplate.php b/api/v3/ReportTemplate.php index e8e98580e7..e699044778 100644 --- a/api/v3/ReportTemplate.php +++ b/api/v3/ReportTemplate.php @@ -130,7 +130,7 @@ function _civicrm_api3_report_template_getrows($params) { $params['report_id'] = civicrm_api3('report_instance', 'getvalue', array('id' => $params['instance_id'], 'return' => 'report_id')); } - $class = civicrm_api3('option_value', 'getvalue', array( + $class = (string) civicrm_api3('option_value', 'getvalue', array( 'option_group_name' => 'report_template', 'return' => 'name', 'value' => $params['report_id'], -- 2.25.1