From 2b61688d26aea0b9a33dd801acbaee5367495beb Mon Sep 17 00:00:00 2001 From: Johan Vervloet Date: Tue, 10 Mar 2015 20:02:39 +0100 Subject: [PATCH] CRM-16036 - Pleasing the php 5.3 gods :-) Thank you @colemanw. ---------------------------------------- * CRM-16036: API: searching on custom fields does not work https://issues.civicrm.org/jira/browse/CRM-16036 --- api/v3/utils.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/v3/utils.php b/api/v3/utils.php index b3dfe2a084..dd01e86104 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -530,7 +530,8 @@ function _civicrm_api3_get_using_query_object_simple($dao_name, $params, $return else { // We expect only one element in the array, of the form // "operator" => "rhs". - $operator = array_keys($value)[0]; + $dummy = array_keys($value); + $operator = $dummy[0]; if (!in_array($operator, CRM_Core_DAO::acceptedSQLOperators())) { // if operator not found, use = as default. $operator = "="; -- 2.25.1