Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Call to a member function on a non-object?
- Oliver Spiesshofer
July 13, 2004, 11:41 am
rate this thread
I am 'hacking' a bit on the opensource blog system Geeklog and while using
a function of the code in another context, I get this error:
Fatal error: Call to a member function on a non-object
I think it would be too much here to go into detail where the error occurs
exactly. Its while calling a custom error-handling function.
what I would like to know is what this error-message means and what I can
conclude from it so I can derive the problem
Re: Call to a member function on a non-object?
Like it says - your code has tried to treat something which is not an object
as if it were (typically by calling $not_an_object->method())
Either the object has not been instantiated or it was copied from something
else which was not an object.
This can also happen if serialize & store an object / change the class
definition and re-instate the object.