The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
possible to include(global.php) in a class?
Hello, here's my test case (php4):
Test.php PHP Code:
dotest.php PHP Code:
Code:
Fatal error: Call to a member function on a non-object in (snip)talk/includes/functions.php on line 1154 Is it possible to create a $vbulletin registry object inside of a class? I did a search and attempted using the solution proposed Here by kolita, and that gives me a vbulletin object that has all the standard properties and that I can enumerate, but only if I skip creating a session (meaning my userinfo array is empty), and this is useless for me. i.e. if I comment out Code:
define('SKIP_SESSIONCREATE', 1); Anyone have some insight? I'm trying to build a amfphp connector to vbulletin and i'm truly stumped. thanks |
#2
|
||||
|
||||
Instead of include_once, try require_once.
|
#3
|
|||
|
|||
How would include_once be different from require_once? i guess your statement was, Instead of include, try require_once. yeah?
Sorry to hijack this thread, but it would be more logical to type here then creating another unnecessary thread. thanks! |
#4
|
||||
|
||||
Include continues regardless if the file was found or not. Require spits out an error and stops execution if it doesn't find the file.
|
#5
|
||||
|
||||
For the purposes of this thread there's no difference between include, require, include_once and require_once.
Note that the error is not occuring in either of the files defined above - but instead in functions.php which is part of the vbulletin inner-workings. This means that the include/require is working up until the point where something about it being inside of a class construct makes Vbulletin go haywire. |
#6
|
||||
|
||||
What version of vBulletin are you using? Line 1154 in 3.6.7 PL1 is part of a comment:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|