Move the pre-assign of pcpBlock further up
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 29 Nov 2023 09:58:26 +0000 (22:58 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 29 Nov 2023 09:58:26 +0000 (22:58 +1300)
This is assigned false, & then assigned again if there is a value to prevent notices (already)
but the first assign isn't always done so we still have notices

CRM/Contribute/Form/Contribution/ThankYou.php

index d24a83b607bb1d996f56ef6b59761fd35132083f..c0335261b62d179ae3314ee11a00622f26c20f6a 100644 (file)
@@ -132,9 +132,9 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont
 
     $qParams = "reset=1&amp;id={$this->_id}";
     //pcp elements
+    $this->assign('pcpBlock', FALSE);
     if ($this->_pcpId) {
       $qParams .= "&amp;pcpId={$this->_pcpId}";
-      $this->assign('pcpBlock', FALSE);
 
       // display honor roll data only if it's enabled for the PCP page
       if (!empty($this->_pcpInfo['is_honor_roll'])) {