class problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

class problem

Post by shiznatix »

ok i get the Fatal error: Call to a member function on a non-object error. it seams to happen at no real specific time, really quite random i must say. would there happen to be a way to make the page refresh as soon as this error occurs? becuase if i hit refresh then it works perfectly always. any ideas as to why this happens?

edit: i think i figured it out. i had to do

$lang = new Lang;
global $lang;

but why? its not in a function, it only happened some times, why?
Post Reply