Fix unreleased regression - notice on undefined variable
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 3 Nov 2023 02:50:38 +0000 (15:50 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 3 Nov 2023 03:40:54 +0000 (16:40 +1300)
This notice is in recently extracted code

CRM/Contribute/Form/Contribution/Main.php

index 5f7d9aa04ab010ae639cde16e0a0b093d03d0f39..11d1a28c730a1867c5a26d1404cb366a4f3ec5e9 100644 (file)
@@ -1802,7 +1802,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
 
       $dao = new CRM_Pledge_DAO_PledgeBlock();
       $dao->entity_table = 'civicrm_contribution_page';
-      $dao->entity_id = $pageID;
+      $dao->entity_id = $this->getContributionPageID();
       if ($dao->find(TRUE)) {
         CRM_Core_DAO::storeValues($dao, $pledgeBlock);
       }
@@ -1869,7 +1869,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
             $this->assign('start_date_editable', FALSE);
             if (!empty($pledgeBlock['is_pledge_start_date_editable'])) {
               $this->assign('start_date_editable', TRUE);
-              if ($field == 'calendar_month') {
+              if ($field === 'calendar_month') {
                 $this->assign('is_date', FALSE);
                 $this->setDefaults(['start_date' => $value]);
               }