Move smarty assign to be always assigned (notices)
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 30 Aug 2023 04:40:38 +0000 (16:40 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 30 Aug 2023 04:40:38 +0000 (16:40 +1200)
CRM/Profile/Form.php

index 19c766776142d0633ac151f95900bbd1b074e5cf..247f41705b738eb360d1bd435c05c292af3015f5 100644 (file)
@@ -492,7 +492,6 @@ class CRM_Profile_Form extends CRM_Core_Form {
           $page->run();
         }
       }
-      $this->assign('multiRecordFieldListing', $multiRecordFieldListing);
 
       // is profile double-opt in?
       if (!empty($this->_fields['group']) &&
@@ -521,7 +520,7 @@ class CRM_Profile_Form extends CRM_Core_Form {
         CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm', 'reset=1'));
       }
     }
-
+    $this->assign('multiRecordFieldListing', $multiRecordFieldListing ?? NULL);
     if (!is_array($this->_fields)) {
       CRM_Core_Session::setStatus(ts('This feature is not currently available.'), ts('Sorry'), 'error');
       CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm', 'reset=1'));