Use ?? operator instead of CRM_Utils_Array::value() when fetching ids
[civicrm-core.git] / CRM / Event / BAO / ParticipantPayment.php
index 401fcd09dad809022c0e6a07b973fb7868163aad..106b2bbae3446b11c30da981080cca1c5302362c 100644 (file)
@@ -31,7 +31,7 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment
    *   the partcipant payment record
    */
   public static function create(&$params, $ids = []) {
-    $id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('id', $ids));
+    $id = $params['id'] ?? $ids['id'] ?? NULL;
     if ($id) {
       CRM_Utils_Hook::pre('edit', 'ParticipantPayment', $id, $params);
     }