Re: Call to a member function on a non-object?

From: Colin McKinnon (colin.deletethis_at_andthis.mms3.com)
Date: 07/13/04


Date: Tue, 13 Jul 2004 09:06:05 +0100

Oliver Spiesshofer wrote:

> 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
>

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.

HTH

C.



Relevant Pages

  • Re: The proof that I was referring to is on the website
    ... In the context of TMs generally, there simply is no such method, ... there is no such thing as "calling". ... ALL possible TMs. ... in its state transition matrix table. ...
    (sci.logic)
  • Re: XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not
    ... Short of carnal knowledge of what's in the target structure or the particular meaning of the context value -- something that's certainly an inviting approach, but generally also not a good idea to know about for reasons of upward-compatibility -- there's often no way to verify these sorts of structures. ... If there's a function available to validate, then I should be calling *that*. ... When I can establish the correctness of all possible inputs, then I will have reached spiritual perfection. ... I know of no way to provide what you want within the context of X Windows, short of rebuilding the whole X Windows platform. ...
    (comp.os.vms)
  • Re: Did anyone read.....
    ... LOL, obviously I'm picking on you a bit, have to expect that. ... and have no idea how to put it into context. ... calling is the best thing to do, and so and so pro said it was a weapon ...
    (rec.gambling.poker)
  • Re: Howard censors his own show
    ... > So calling a woman the most vile and hateful thing possible is a "comedic ... Only in right context of course. ...
    (alt.fan.howard-stern)
  • Call to a member function on a non-object?
    ... I am 'hacking' a bit on the opensource blog system Geeklog and while using ... a function of the code in another context, ... Fatal error: Call to a member function on a non-object ... Its while calling a custom error-handling function. ...
    (comp.lang.php)