Cleanup uses of CRM_Utils_Array::value related to numbers
[civicrm-core.git] / CRM / Core / BAO / Block.php
index edee3b3d8a4e530f78d92411e14d2f28c2a566bb..86210384041c3ded599594b45206e6e05bfb7ac8 100644 (file)
@@ -399,7 +399,7 @@ class CRM_Core_BAO_Block {
     }
 
     // contact_id in params might be empty or the string 'null' so cast to integer
-    $contactId = (int) CRM_Utils_Array::value('contact_id', $params);
+    $contactId = (int) ($params['contact_id'] ?? 0);
     // If id is set & we haven't been passed a contact_id, retrieve it
     if (!empty($params['id']) && !isset($params['contact_id'])) {
       $entity = new $class();