Merge pull request #16488 from mattwire/quickform_requiredfields
[civicrm-core.git] / CRM / UF / Page / ProfileEditor.php
index bbd6c1f49b9abd120a77cf2acbd7df2b026a7629..466278a3fa460bd9860a9363fb660cb353f680d5 100644 (file)
@@ -14,7 +14,7 @@ class CRM_UF_Page_ProfileEditor extends CRM_Core_Page {
    * @throws \Exception
    */
   public function run() {
-    CRM_Core_Error::fatal('This is not a real page!');
+    throw new CRM_Core_Exception('This is not a real page!');
   }
 
   /**
@@ -295,11 +295,11 @@ class CRM_UF_Page_ProfileEditor extends CRM_Core_Page {
       $sectionName = 'cg_' . $customGroup->id;
       $section = [
         'title' => ts('%1: %2', [1 => $title, 2 => $customGroup->title]),
-        'is_addable' => $customGroup->is_reserved ? FALSE : TRUE,
+        'is_addable' => !$customGroup->is_reserved,
         'custom_group_id' => $customGroup->id,
         'extends_entity_column_id' => $customGroup->extends_entity_column_id,
         'extends_entity_column_value' => CRM_Utils_Array::explodePadded($customGroup->extends_entity_column_value),
-        'is_reserved' => $customGroup->is_reserved ? TRUE : FALSE,
+        'is_reserved' => (bool) $customGroup->is_reserved,
       ];
       $result['sections'][$sectionName] = $section;
     }