Return FALSE instead of throwing Exception if package throws Exception
[civicrm-core.git] / CRM / Extension / Manager / Report.php
index f68af4bb90ff2aaab0ca57d2de87db31122c34f1..3302ec29182482bfc1d8645ca7941b94b385a42d 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018                                |
+ | Copyright CiviCRM LLC (c) 2004-2019                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -29,7 +29,7 @@
  * This class stores logic for managing CiviCRM extensions.
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
  */
 class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base {
 
@@ -67,10 +67,10 @@ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base {
       CRM_Core_Error::fatal("Component for which you're trying to install the extension (" . $info->typeInfo['component'] . ") is currently disabled.");
     }
     $weight = CRM_Utils_Weight::getDefaultWeight('CRM_Core_DAO_OptionValue',
-      array('option_group_id' => $this->groupId)
+      ['option_group_id' => $this->groupId]
     );
-    $ids = array();
-    $params = array(
+    $ids = [];
+    $params = [
       'label' => $info->label . ' (' . $info->key . ')',
       'value' => $info->typeInfo['reportUrl'],
       'name' => $info->key,
@@ -79,7 +79,7 @@ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base {
       'component_id' => $compId,
       'option_group_id' => $this->groupId,
       'is_active' => 1,
-    );
+    ];
 
     $optionValue = CRM_Core_BAO_OptionValue::add($params, $ids);
   }