1
petec
$xoopsTpl giving "Call to a member function on a non-object" error
  • 2005/1/25 17:26

  • petec

  • Just popping in

  • Posts: 1

  • Since: 2005/1/25


Hello all,
I'm trying to build my first module, and when I run my index.php I'm getting

"Call to a member function on a non-object in {root directory}/footer.php on line 35"

where {root directory} is the root html directory for xoops. Normally this means the object wasn't defined or configured properly, however I checked out the line and it seems to be trying to run the method
$xoopsTpl->xoops_setCaching(0);

on the XOOPS template object.
what's weird is I have lots of code on top of this (Well in the index.php) which uses $xoopsTpl->assign, and these seem to work fine. it's just this setcaching thing which seems to be the problem.

Are there files other than mainfile.php which I need to include in order for this to work? I tried checking out other modules but can't see other differences between those and mine.

thanks,
Pete

2
m0nty
Re: $xoopsTpl giving "Call to a member function on a non-object" error
  • 2005/1/25 17:35

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


other includes u might need are:

include XOOPS_ROOT_PATH . '/header.php';

and possibly $myts = & MyTextSanitizer :: getInstance();

Login

Who's Online

198 user(s) are online (130 user(s) are browsing Support Forums)


Members: 0


Guests: 198


more...

Donat-O-Meter

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

Latest GitHub Commits