X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=api%2Fv3%2FEntityTag.php;h=cfc212a32800dfc203a3b97252b64e07993be5c9;hb=3e8af49f20da345e0a3d3606b6a5339d125b348b;hp=f87a2c670048b78a3035f4729bdf823374a9f3b8;hpb=a30c801bdf595f8a00898941142b57773e097244;p=civicrm-core.git diff --git a/api/v3/EntityTag.php b/api/v3/EntityTag.php index f87a2c6700..cfc212a328 100644 --- a/api/v3/EntityTag.php +++ b/api/v3/EntityTag.php @@ -159,7 +159,7 @@ function civicrm_api3_entity_tag_replace($params) { // Lookup pre-existing records $preexisting = civicrm_api3('entity_tag', 'get', $baseParams); $preexisting = array_column($preexisting['values'], 'tag_id'); - $toAdd = isset($params['tag_id']) ? $params['tag_id'] : array_column($params['values'], 'tag_id'); + $toAdd = $params['tag_id'] ?? array_column($params['values'], 'tag_id'); $toRemove = array_diff($preexisting, $toAdd); $result = [];