Smarty notice fix
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 2 Oct 2023 21:55:00 +0000 (10:55 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 2 Oct 2023 21:55:00 +0000 (10:55 +1300)
CRM/Contribute/Page/Tab.php
templates/CRM/Contribute/Form/Contribution.tpl

index 641bb6ee4f01c5d95cdb01fab45715d133b8a9f7..b9ed69a9ba76c80ca3e30eacde8d6ecf07ea0771 100644 (file)
@@ -428,7 +428,7 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page {
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
 
-    if ($context == 'standalone') {
+    if ($context === 'standalone') {
       $this->_action = CRM_Core_Action::ADD;
     }
     else {
@@ -439,11 +439,11 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page {
           'return' => 'contact_id',
         ]);
       }
-      $this->assign('contactId', $this->_contactId);
 
       // check logged in url permission
       CRM_Contact_Page_View::checkUserPermission($this);
     }
+    $this->assign('contactId', $this->_contactId);
     $this->assign('action', $this->_action);
 
     if ($this->_permission == CRM_Core_Permission::EDIT && !CRM_Core_Permission::check('edit contributions')) {
index 1ebc799eec212ca0b1bc44bb01da95e810d701d3..0e6c1cabc38fcec960455a43af2ad62ca5a27748 100644 (file)
     <!-- end of PCP -->
 
     {if !$payNow}
-      {include file="CRM/common/customDataBlock.tpl"}
+      {include file="CRM/common/customDataBlock.tpl" cid=$contactId}
     {/if}
 
     {literal}