amatulic,
Your code works great from a PHP page that has no other includes, but as soon as I plugged it into my own CMS, I got the dreaded:
PHP Fatal error: Call to a member function query_first_slave() on a non-object in /var/www/html/papatangopapa.com/forums/includes/functions.php on line 1194
My CMS has its own session management stuff and also uses a custom __autoload function, I wonder if that breaks things in some weird way.
--------------- Added [DATE]1195925781[/DATE] at [TIME]1195925781[/TIME] ---------------
I think it's due to vBulletin's insane reliance on global variables.
When you have:
A.php including init.php and functions.php directly,
there is no problem.
When you have:
a function in B.php including including C.PHP, which includes init.php and functions.php,
you get:
PHP Fatal error: Call to a member function query_first_slave() on a non-object in /var/www/html/papatangopapa.com/forums/includes/functions.php on line 1194
--------------- Added [DATE]1195926210[/DATE] at [TIME]1195926210[/TIME] ---------------
That's also how and why you might end up using cURL in order to keep your application and the namespace polluting vBulletin back-end completely separate.
|