Merge pull request #16731 from eileenmcnaughton/regress
[civicrm-core.git] / CRM / Event / PseudoConstant.php
index c6439a44b8c1e59c81b346bed6e6029be60ba127..780adc60b11512e9e7fa1ada510ca551516b9854 100644 (file)
@@ -125,7 +125,7 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant {
 
     $index = $cond ? $cond : 'No Condition';
     $index = "{$index}_{$retColumn}";
-    if (!CRM_Utils_Array::value($index, self::$participantStatus)) {
+    if (empty(self::$participantStatus[$index])) {
       self::$participantStatus[$index] = [];
       CRM_Core_PseudoConstant::populate(self::$participantStatus[$index],
         'CRM_Event_DAO_ParticipantStatusType',
@@ -182,7 +182,7 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant {
    */
   public static function &participantRole($id = NULL, $cond = NULL) {
     $index = $cond ? $cond : 'No Condition';
-    if (!CRM_Utils_Array::value($index, self::$participantRole)) {
+    if (empty(self::$participantRole[$index])) {
       self::$participantRole[$index] = [];
 
       $condition = NULL;
@@ -298,7 +298,7 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant {
       );
     }
     if ($id) {
-      return CRM_Utils_Array::value($id, self::$pcPage);
+      return self::$pcPage[$id] ?? NULL;
     }
     return self::$pcPage;
   }