From 859c2bc36f317f6e5371fd9ab96be412c3fa848f Mon Sep 17 00:00:00 2001 From: Johan Vervloet Date: Tue, 23 Jun 2015 08:41:48 +0200 Subject: [PATCH] CRM-16701 - previous fix in result_cleanup was not sufficient. Avoid errors in testSqlOperators (getCount and getSingle operatior). ---------------------------------------- * CRM-16701: Create API for saved searches https://issues.civicrm.org/jira/browse/CRM-16701 --- api/v3/SavedSearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/SavedSearch.php b/api/v3/SavedSearch.php index 728524e366..6048aedcb9 100644 --- a/api/v3/SavedSearch.php +++ b/api/v3/SavedSearch.php @@ -99,7 +99,7 @@ function civicrm_api3_saved_search_get($params) { * @param array $result API result to be cleaned up. */ function _civicrm_api3_saved_search_result_cleanup(&$result) { - if (isset($result['values'])) { + if (isset($result['values']) && is_array($result['values'])) { // Only clean up the values if there are values. (A getCount operation // for example does not return values.) foreach ($result['values'] as $key => $value) { -- 2.25.1