From faee60951e157d8a020e695972877e3bb044b7f4 Mon Sep 17 00:00:00 2001 From: Johan Vervloet Date: Wed, 11 Mar 2015 10:17:52 +0100 Subject: [PATCH] Using CRM_Utils_Array::first. --- api/v3/utils.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/v3/utils.php b/api/v3/utils.php index dd01e86104..bdb6102f58 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -530,8 +530,7 @@ 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". - $dummy = array_keys($value); - $operator = $dummy[0]; + $operator = CRM_Utils_Array::first(array_keys($value)); if (!in_array($operator, CRM_Core_DAO::acceptedSQLOperators())) { // if operator not found, use = as default. $operator = "="; -- 2.25.1