Merge pull request #22652 from civicrm/5.46
[civicrm-core.git] / CRM / Logging / ReportSummary.php
index 2216aa46b8f701ac29fb396fff7a68edbf14702b..5ecdcac11bebff0136b4ed60fae0b8946134e07e 100644 (file)
@@ -1,35 +1,16 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 5                                                  |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2020                                |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM.                                    |
- |                                                                    |
- | CiviCRM is free software; you can copy, modify, and distribute it  |
- | under the terms of the GNU Affero General Public License           |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
- |                                                                    |
- | CiviCRM is distributed in the hope that it will be useful, but     |
- | WITHOUT ANY WARRANTY; without even the implied warranty of         |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
- | See the GNU Affero General Public License for more details.        |
+ | Copyright CiviCRM LLC. All rights reserved.                        |
  |                                                                    |
- | You should have received a copy of the GNU Affero General Public   |
- | License and the CiviCRM Licensing Exception along                  |
- | with this program; if not, contact CiviCRM LLC                     |
- | at info[AT]civicrm[DOT]org. If you have questions about the        |
- | GNU Affero General Public License or the licensing of CiviCRM,     |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ | This work is published under the GNU AGPLv3 license with some      |
+ | permitted exceptions and without any warranty. For full license    |
+ | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
  */
 
 /**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2020
- * $Id$
+ * Class CRM_Logging_ReportSummary
  */
 class CRM_Logging_ReportSummary extends CRM_Report_Form {
   protected $cid;
@@ -296,7 +277,7 @@ WHERE  log_date <= %1 AND id = %2 ORDER BY log_date DESC LIMIT 1";
         if (array_key_exists('options', $this->_logTables[$entity]['bracket_info']) &&
           $entityID
         ) {
-          return CRM_Utils_Array::value($entityID, $this->_logTables[$entity]['bracket_info']['options']);
+          return $this->_logTables[$entity]['bracket_info']['options'][$entityID] ?? NULL;
         }
       }
     }
@@ -358,7 +339,7 @@ WHERE  log_date <= %1 AND id = %2 ORDER BY log_date DESC LIMIT 1";
     $this->addToDeveloperTab($this->temporaryTable->getCreateSql());
     $this->temporaryTableName = $this->temporaryTable->getName();
 
-    $logTypes = CRM_Utils_Array::value('log_type_value', $this->_params);
+    $logTypes = $this->_params['log_type_value'] ?? NULL;
     unset($this->_params['log_type_value']);
     if (empty($logTypes)) {
       foreach (array_keys($this->_logTables) as $table) {