Remove unused variable
authoreileen <emcnaughton@wikimedia.org>
Wed, 23 Sep 2020 03:31:07 +0000 (15:31 +1200)
committereileen <emcnaughton@wikimedia.org>
Sat, 26 Sep 2020 01:08:25 +0000 (13:08 +1200)
CRM/Activity/BAO/Activity.php

index ad656ea90650daf860d1a87e3c6fa467e77a0b95..1bea3cd02e9339868216945822e2dfafc9044b91 100644 (file)
@@ -411,11 +411,9 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
     }
 
     // attempt to save activity targets
-    $resultTarget = NULL;
     if (!empty($params['target_contact_id'])) {
 
       $targetParams = ['activity_id' => $activityId];
-      $resultTarget = [];
       if (is_array($params['target_contact_id'])) {
         // first delete existing targets if any
         self::deleteActivityContact($activityId, $targetID);
@@ -442,11 +440,11 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
 
           if ($target->contact_id != $params['target_contact_id']) {
             $targetParams['id'] = $target->id;
-            $resultTarget = CRM_Activity_BAO_ActivityContact::create($targetParams);
+            CRM_Activity_BAO_ActivityContact::create($targetParams);
           }
         }
         else {
-          $resultTarget = CRM_Activity_BAO_ActivityContact::create($targetParams);
+          CRM_Activity_BAO_ActivityContact::create($targetParams);
         }
       }
     }