Merge pull request #17340 from demeritcowboy/not-yet-deprecated
[civicrm-core.git] / CRM / Contribute / Tokens.php
index e773317a23f6467f4515773ba3e91be13d968f03..528e15b13a11faa671745e607e1b5dee52e3360d 100644 (file)
@@ -110,7 +110,7 @@ class CRM_Contribute_Tokens extends \Civi\Token\AbstractTokenSubscriber {
    */
   public function evaluateToken(\Civi\Token\TokenRow $row, $entity, $field, $prefetch = NULL) {
     $actionSearchResult = $row->context['actionSearchResult'];
-    $fieldValue = isset($actionSearchResult->{"contrib_$field"}) ? $actionSearchResult->{"contrib_$field"} : NULL;
+    $fieldValue = $actionSearchResult->{"contrib_$field"} ?? NULL;
 
     $aliasTokens = $this->getAliasTokens();
     if (in_array($field, ['total_amount', 'fee_amount', 'net_amount'])) {