Quote:
Originally Posted by Inkybro
Can you please elaborate on the v1.2 bug, I don't quite understand how to prevent what you're saying. Any help here would be appreciated.
|
It is still present in 1.5 ...
On hook paidsub_build you are defininig two functions - slw_serial() and slw_unserial().
Now, if method build_user_subscription() is being called several times within one script run, this will cause a fatal error as you the functions are already defined when the plugin is called the second time - which will halt script execution.
Also, I don't understand why you are using custom serialize functions anyway
Instead of $db->fetch_array($db->query_read()), $db->query_first is easier.
I also suggest to use phrases instead of the datastore item - this is the standard way to do such things (PM;/E-Mail Notifications).
Finally, having hardcoded text in PHP scripts is deprecated.