1
coopersita
Fatal error: Call to a member function on a non-object

I know a lot has been written on the subject, but I don't understand why I get this error:

Fatal error: Call to a member function on a non-object in...

I read the
FAQ entry about it, but my server admin says the server doesn't have Zend optimizer installed, and the error doesn't happen in the config file, but in the home page of a module (the other pages of the same module still work).

I also read that it can happen if you have an old version of PHP, but the version installed is 4.4.4

So what could be the problem?

2
Dave_L
Re: Fatal error: Call to a member function on a non-object
  • 2007/1/30 18:25

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Without the complete error message, it's impossible to tell what's causing it.

One possibility is that a method (member function) is called on an object, such as $xoopsUser, within a function, and $xoopsUser is not declared as global within the function.

Another possibility is that the include-file that defines the object in question is not being included.

3
coopersita
Re: Fatal error: Call to a member function on a non-object

The module is Recette.

The error is really weird, because when the module has first installed, it was working fine, but as soon as the first recipe was entered, the home page for that module went blank. You can still use the submit and archive pages of that module, and blocks on the home page for that module still work.

4
coopersita
Re: Fatal error: Call to a member function on a non-object

the only error it shows is:


Fatal error: Call to a member function on a non-object in /mypath/modules/recette/class/class.newsstory.php on line 127

It also does it for the home page when I use some of the recette module blocks.

Any ideas what could be wrong?


It it the module or the PHP installation?

5
Dave_L
Re: Fatal error: Call to a member function on a non-object
  • 2007/2/5 20:03

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I'm not familiar with that module.

The next step in tracking down the problem would be to look at line 127 of class.newsstory.php, and probably dump out some variables.

Login

Who's Online

161 user(s) are online (88 user(s) are browsing Support Forums)


Members: 0


Guests: 161


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits