To fix this error in my custom code I had to declare any objects I pass into procedure that are not in my module as global. I also had to declare the
global $vbulletin;
object and convert code like
$db->query_read(
to
$vbulletin->db->query_read(
I'm not a PHP coder (although I code full time in another language) so your mileage may vary.
It's worth noting that all the error is raised in the VB code, the actual error occurs because you are using a variable that has *not* been initialised to actually contain an object. I think this related to the fact that since they aren't global the VB procedure is using it's own instance of the variable name and not the one you are using.
|