Merge pull request #27817 from colemanw/arrayCleanupCore
authorcolemanw <coleman@civicrm.org>
Sun, 15 Oct 2023 05:12:06 +0000 (01:12 -0400)
committerGitHub <noreply@github.com>
Sun, 15 Oct 2023 05:12:06 +0000 (01:12 -0400)
[REF] CRM/Core - Refactor unnecessary uses of CRM_Utils_Array::value

1  2 
CRM/Core/BAO/Navigation.php

index f81e4fa2582a31f1ca3768ba47998daa9422fc4a,ad053d8c87c51881ec370ce1d224908083cea9f6..9a5bb862a260db8c05fbd490df3f5890b1d0f167
@@@ -74,9 -74,10 +74,9 @@@ class CRM_Core_BAO_Navigation extends C
     * @return CRM_Core_DAO_Navigation
     */
    public static function add(&$params) {
 -    $navigation = new CRM_Core_DAO_Navigation();
      if (empty($params['id'])) {
-       $params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE);
-       $params['has_separator'] = CRM_Utils_Array::value('has_separator', $params, FALSE);
+       $params['is_active'] = $params['is_active'] ?? FALSE;
+       $params['has_separator'] = $params['has_separator'] ?? FALSE;
        $params['domain_id'] = CRM_Utils_Array::value('domain_id', $params, CRM_Core_Config::domainID());
      }