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

Alice Heaton’s picture

My 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.

JamesAn’s picture

Status: Active » Closed (fixed)

Hiya,

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! ^_^