[REF][PHP8.2] Tidy up use of properties in CRM_Campaign_Form_Task_Release
authorBradley Taylor <hello@brad-taylor.co.uk>
Sat, 9 Dec 2023 12:24:44 +0000 (12:24 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sat, 9 Dec 2023 12:24:44 +0000 (12:24 +0000)
CRM/Campaign/Form/Task/Release.php

index ae17d3be8ca8dcac85f395583e1a61ed02332647..6f9b94468a744f80814f5f0929b180d0aac5c96d 100644 (file)
@@ -47,12 +47,12 @@ class CRM_Campaign_Form_Task_Release extends CRM_Campaign_Form_Task {
    * Build all the data structures needed to build the form.
    */
   public function preProcess() {
-    $this->_interviewToRelease = $this->get('interviewToRelease');
-    if ($this->_interviewToRelease) {
+    $interviewToRelease = $this->get('interviewToRelease');
+    if ($interviewToRelease) {
       //user came from interview form.
-      foreach (['surveyId', 'contactIds', 'interviewerId'] as $fld) {
-        $this->{"_$fld"} = $this->get($fld);
-      }
+      $this->_surveyId = $this->get('surveyId');
+      $this->_contactIds = $this->get('contactIds');
+      $this->_interviewerId = $this->get('interviewerId');
 
       if (!empty($this->_contactIds)) {
         $this->assign('totalSelectedContacts', count($this->_contactIds));