X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FGeneric%2FUpdate.php;h=68e4fe5e66e7aa7731191394dc76ff9845c5d21c;hb=04aaf2036aa59e1484ca692a472f2a1708e92151;hp=9975de71e57f12354c224f0226771a42cb97d9f2;hpb=a344bc3ec2c10edea74939c76d40d3ca077733fa;p=civicrm-core.git diff --git a/api/v3/Generic/Update.php b/api/v3/Generic/Update.php index 9975de71e5..68e4fe5e66 100644 --- a/api/v3/Generic/Update.php +++ b/api/v3/Generic/Update.php @@ -1,5 +1,30 @@ $apiRequest['params'][$key_id], 'version' => $apiRequest['version']); $existing = civicrm_api($apiRequest['entity'], 'get', $seek); @@ -31,10 +62,10 @@ function civicrm_api3_generic_update($apiRequest) { return $existing; } if ($existing['count'] > 1) { - return $errorFnName("More than one " . $apiRequest['entity'] . " with id " . $apiRequest['params'][$key_id]); + return civicrm_api3_create_error("More than one " . $apiRequest['entity'] . " with id " . $apiRequest['params'][$key_id]); } if ($existing['count'] == 0) { - return $errorFnName("No " . $apiRequest['entity'] . " with id " . $apiRequest['params'][$key_id]); + return civicrm_api3_create_error("No " . $apiRequest['entity'] . " with id " . $apiRequest['params'][$key_id]); } $existing = array_pop($existing['values']);