Skip to content
Snippets Groups Projects
Commit d0d752f8 authored by Tim Otten's avatar Tim Otten
Browse files

Merge pull request #712 from totten/fix-allfields-crash

api/v3/utils - Redo 16404fbb for preventing fatal error
parents 31c52fa4 ed22af33
Branches
Tags
No related merge requests found
......@@ -539,7 +539,11 @@ function _civicrm_api3_dao_set_filter(&$dao, $params, $unique = TRUE, $entity) {
}
else {
if ($unique) {
$allfields[$field]['name'] = $params[$field];
$daoFieldName = $allfields[$field]['name'];
if (empty($daoFieldName)) {
throw new API_Exception("Failed to determine field name for \"$field\"");
}
$dao->{$daoFieldName} = $params[$field];
}
else {
$dao->$field = $params[$field];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment