Closed (fixed)
Project:
lm_paypal
Version:
6.x-1.0
Component:
LM Paypal Base
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2009 at 05:14 UTC
Updated:
29 Mar 2009 at 18:29 UTC
lm_paypal.module, line 118. The for loop is supposed to call all "_$module_ini" functions, mostly yo ensure that all web_accept processors are registered.
Should if (strncmp($module, "lm_paypal", 9) == 0) be if (strncmp($module, "lm_paypal", 9) != 0)? The "_$module_ini" functions should be called by _lm_paypal_ini if $module != _lm_paypal_ini.
I struggle with this while writing my own web_accept processor.
Comments
Comment #1
Alice Heaton commentedMy guess about that code is :
1. It fetches all the module that contain the string "lm_paypal" in their name ; such as lm_paypal_donations ;
2. If this module has a function _<module_name>_ini then it calls it.
It would probably have been better to use module_invoke, but I don't think there is a bug in that code. It will call itself, but the static $inited prevents that.
Does your module include the string "lm_paypal" in its name ? If not that's probably the problem.
Comment #2
JamesAn commentedHiya,
You're right. I misunderstood the meaning of the code. It would be better to use module_invoke and just create a lm_paypal hook of some sort. In any case, issue closed. Thanks! ^_^