Thank you @colemanw.
----------------------------------------
* CRM-16036: API: searching on custom fields does not work
https://issues.civicrm.org/jira/browse/CRM-16036
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 = "=";