From 341c643678e5ba32e926da55c3a9956fb7dd07fb Mon Sep 17 00:00:00 2001 From: kurund Date: Sat, 5 Jul 2014 19:59:12 +0530 Subject: [PATCH] strict warning fixes CRM-14944 ---------------------------------------- * CRM-14944: function should not be called statically - pledge page https://issues.civicrm.org/jira/browse/CRM-14944 --- CRM/Pledge/Page/Payment.php | 2 +- CRM/Pledge/Page/Tab.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CRM/Pledge/Page/Payment.php b/CRM/Pledge/Page/Payment.php index ac36d7e2d1..6d5ab08dc2 100644 --- a/CRM/Pledge/Page/Payment.php +++ b/CRM/Pledge/Page/Payment.php @@ -49,7 +49,7 @@ class CRM_Pledge_Page_Payment extends CRM_Core_Page { $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this); - CRM_Pledge_Page_Tab::setContext(); + CRM_Pledge_Page_Tab::setContext($this); if ($this->_action & CRM_Core_Action::UPDATE) { $this->edit(); diff --git a/CRM/Pledge/Page/Tab.php b/CRM/Pledge/Page/Tab.php index ca0e360704..152e8b7caf 100644 --- a/CRM/Pledge/Page/Tab.php +++ b/CRM/Pledge/Page/Tab.php @@ -138,7 +138,7 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page { // check if we can process credit card registration $this->assign('newCredit', CRM_Core_Config::isEnabledBackOfficeCreditCardPayments()); - $this->setContext(); + self::setContext($this); if ($this->_action & CRM_Core_Action::VIEW) { $this->view(); @@ -159,10 +159,10 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page { return parent::run(); } - function setContext() { - $context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'search'); + function setContext(&$form) { + $context = CRM_Utils_Request::retrieve('context', 'String', $form, FALSE, 'search'); - $qfKey = CRM_Utils_Request::retrieve('key', 'String', $this); + $qfKey = CRM_Utils_Request::retrieve('key', 'String', $form); //validate the qfKey if (!CRM_Utils_Rule::qfKey($qfKey)) { $qfKey = NULL; @@ -209,8 +209,8 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page { default: $cid = NULL; - if ($this->_contactId) { - $cid = '&cid=' . $this->_contactId; + if ($form->_contactId) { + $cid = '&cid=' . $form->_contactId; } $url = CRM_Utils_System::url('civicrm/pledge/search', 'force=1' . $cid -- 2.25.1