From 3cfac5f306ea67b316bfc7b3c30502da336cd978 Mon Sep 17 00:00:00 2001
From: Eileen McNaughton <emcnaughton@wikimedia.org>
Date: Sat, 15 Jul 2023 13:11:05 +1200
Subject: [PATCH] Use internal variable rather than property to pass variable

---
 CRM/Contact/Form/Edit/CustomData.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/CRM/Contact/Form/Edit/CustomData.php b/CRM/Contact/Form/Edit/CustomData.php
index 61bb1c3634..4e48301453 100644
--- a/CRM/Contact/Form/Edit/CustomData.php
+++ b/CRM/Contact/Form/Edit/CustomData.php
@@ -24,20 +24,20 @@ class CRM_Contact_Form_Edit_CustomData {
    * Build all the data structures needed to build the form.
    *
    * @param CRM_Core_Form $form
+   *
+   * @throws \CRM_Core_Exception
    */
   public static function preProcess(&$form) {
-    $form->_type = CRM_Utils_Request::retrieve('type', 'String');
+    $customDataType = CRM_Utils_Request::retrieve('type', 'String');
 
-    //build the custom data as other blocks.
-    //$form->assign( "addBlock", false );
-    if ($form->_type) {
+    if ($customDataType) {
       $form->_addBlockName = 'CustomData';
       $form->assign("addBlock", TRUE);
       $form->assign("blockName", $form->_addBlockName);
     }
 
     CRM_Custom_Form_CustomData::preProcess($form, NULL, NULL, NULL,
-      ($form->_type) ? $form->_type : $form->_contactType
+      $customDataType ?: $form->_contactType
     );
 
     //assign group tree after build.
-- 
2.25.1