no. I'm suggesting that the problem is not in the code you posted but something else that calls that code. The code you posted (I assume) is standard vBulletin code and should work fine. It's some other hack/mod elsewhere that hasn't hasn't used the globally defined $vbulletin variable that is causing this code to fail as a side effect.
But since I don't have anymore info on your setup, this is just a best guess.
|