We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 7713 - errors caused by request parameter in PaymentManager constructor
errors caused by request parameter in PaymentManager constructor
Status: RESOLVED DUPLICATE of bug 7229
Product: OJS
Classification: Unclassified
Component: Payments
All All
: P3 normal
Assigned To: PKP Support
Depends on:
  Show dependency treegraph
Reported: 2012-07-23 11:51 PDT by Charles Parker
Modified: 2012-07-23 11:53 PDT (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:


Note You need to log in before you can comment on or make changes to this bug.
Description Charles Parker 2012-07-23 11:51:01 PDT
I'm getting the following error at the top of each page if I have display_errors set to On:

ojs2 has produced an error Message:

WARNING: Missing argument 1 for PaymentManager::PaymentManager(),
 called in classes/payment/ojs/OJSPaymentManager.inc.php on line 35
 and defined In file: lib/pkp/classes/payment/PaymentManager.inc.php
 At line: 22

 File: lib/pkp/classes/payment/PaymentManager.inc.php line 22
 Function: PKPApplication->errorHandler(2, "Missing argument 1 for PaymentManager::PaymentManager(),
	   called in classes/payment/ojs/OJSPaymentManager.inc.php on line 35
 	   and defined", "lib/pkp/classes/payment/PaymentManager.inc.php", 22, Array(0))

 File: classes/payment/ojs/OJSPaymentManager.inc.php line 35
 Function: PaymentManager->PaymentManager()

 File: classes/template/TemplateManager.inc.php line 115
 Function: OJSPaymentManager->getManager()

 File: lib/pkp/classes/template/PKPTemplateManager.inc.php line 340
 Function: TemplateManager->TemplateManager(Null)

 File: plugins/generic/staticPages/StaticPagesPlugin.inc.php line 65
 Function: PKPTemplateManager->getManager()

 File: (unknown) line (unknown)
 Function: StaticPagesPlugin->callbackHandleContent("LoadHandler", Array(3))

 File: lib/pkp/classes/plugins/HookRegistry.inc.php line 79
 Function: call_user_func(Array(2), "LoadHandler", Array(3))

 File: lib/pkp/classes/core/PKPPageRouter.inc.php line 224
 Function: HookRegistry->call("LoadHandler", Array(3))

 File: lib/pkp/classes/core/Dispatcher.inc.php line 129
 Function: PKPPageRouter->route(Object(Request))

 File: lib/pkp/classes/core/PKPApplication.inc.php line 180
 Function: Dispatcher->dispatch(Object(Request))

 File: index.php line 65
 Function: PKPApplication->execute()

Server info:
OS: Darwin
PHP Version: 5.3.8
DB Driver: mysql
DB server version: 5.5.15


It looks to me that there is an unnecessary parameter in the PaymentManager constructor. The only place I see the constructor called is in OJSPaymentManager, and it does not provide any arguments:

classes/payment/ojs/OJSPaymentManager.inc.php line 35:
$manager = new OJSPaymentManager();


function PaymentManager($request)
	$this->request =& $request;

I have not found anything that accesses such a property, other than the constructor.

Is there a reason the constructor has this request parameter? Can the parameter be safely removed from the constructor?
Comment 1 Alec Smecher 2012-07-23 11:52:35 PDT

*** This bug has been marked as a duplicate of bug 7229 ***
Comment 2 Alec Smecher 2012-07-23 11:53:19 PDT
Charles, it's worth keeping a watch on http://pkp.sfu.ca/wiki/index.php/OJS_2.3.7_Recommended_Patches for a short-list of patches to consider applying between releases.