![]() |
Posting into vB from a non-vB Page
Hello,
I have an script on my site which creates a new thread on the vB forums. Ever since I upgraded it is no longer working, the page will give me an error with the following - Fatal error: Database object is not an object in [path]/includes/class_dm.php on line 172 So I'm assuming things have changed. How do I make this possible now in 3.7.1? |
Why don't you post the part of the code around line 172.
|
I'm assuming you have the same codebase as us, but it is the trigger_error in this function:
/** * Constructor - checks that the registry object has been passed correctly. * * @param vB_Registry Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member. * @param integer One of the ERRTYPE_x constants */ function vB_DataManager(&$registry, $errtype = ERRTYPE_STANDARD) { if (!is_subclass_of($this, 'vB_DataManager')) { trigger_error("Direct Instantiation of vB_DataManager class prohibited.", E_USER_ERROR); } if (is_object($registry)) { $this->registry =& $registry; if (is_object($registry->db)) { $this->dbobject =& $registry->db; } else { trigger_error('Database object is not an object', E_USER_ERROR); } } else { trigger_error('Registry object is not an object', E_USER_ERROR); } $this->set_error_handler($errtype); if (is_array($this->bitfields)) { foreach ($this->bitfields AS $key => $val) { if (isset($this->registry->$val)) { $this->bitfields["$key"] =& $this->registry->$val; } else { trigger_error("Please check the <em>\$bitfields</em> array in the <strong>" . get_class($this) . "</strong> class definition - <em>\$vbulletin->$val</em> is not a valid bitfield.<br />", E_USER_ERROR); } } } } |
Quote:
|
The vB files are unmodified. The script I'm using invokes a vB class --
Code:
$threaddm = new vB_DataManager_Thread_FirstPost($vbulletin, ERRTYPE_STANDARD); |
Hey Cryo,
I did some searching around about your problem and found others with the same problem but no solution yet. You might want to make a post in the Programming forum and post the part of your code that creates the new user and then post your error. That might get you the attention you need. Unfortunately, I can't offer a solution. |
Thanks for looking into it, Lynne. I searched around a bit too and couldn't find anything either. :(
|
All times are GMT. The time now is 06:23 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|