1
landry
Fatal error: Call to a member function on a non-object
  • 2005/8/12 0:44

  • landry

  • Just popping in

  • Posts: 22

  • Since: 2005/6/7 2


How do I troubleshoot this error? Normally I have a pretty good idea of where to begin but this leaves me clueless. I have not changed header.php. Line 138 reads: $xoopsLogger->addBlock($block_arr[$i]->getVar('name'));

From the context (see below), it looks like the error is happening when the template is first loaded...something about addBlock() or getVar() is not right but I'm unsure as to where to look from there.

Any suggestions?

Fatal error: Call to a member function on a non-object in header.php on line 138

xoops 2.0.9.2


$btpl = $block_arr[$i]->getVar('template');
if ($btpl != '') {
if (empty($bcachetime) || !$xoopsTpl->is_cached('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid'))) {
$xoopsLogger->addBlock($block_arr[$i]->getVar('name'));
$bresult =& $block_arr[$i]->buildBlock();
if (!$bresult) {
continue;
}
$xoopsTpl->assign_by_ref('block', $bresult);
$bcontent =& $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid'));
$xoopsTpl->clear_assign('block');
} else {
$xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime);
$bcontent =& $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid'));
}
} else {
$bid = $block_arr[$i]->getVar('bid');
if (empty($bcachetime) || !$xoopsTpl->is_cached('db:system_dummy.html', 'blk_'.$bid)) {
$xoopsLogger->addBlock($block_arr[$i]->getVar('name'));
$bresult =& $block_arr[$i]->buildBlock();
if (!$bresult) {
continue;
}
$xoopsTpl->assign_by_ref('dummy_content', $bresult['content']);
$bcontent =& $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid);
$xoopsTpl->clear_assign('block');
} else {
$xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime);
$bcontent =& $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid);
}
}

2
landry
Re: Fatal error: Call to a member function on a non-object
  • 2005/8/18 2:31

  • landry

  • Just popping in

  • Posts: 22

  • Since: 2005/6/7 2


I am not sure what I did to cause this error. I was searching for a way to force users to log out when they visited an external link. Although I don't remember changing anything, apparently I did as the site no longer works.

3
hyperpod
Re: Fatal error: Call to a member function on a non-object
  • 2005/8/19 4:57

  • hyperpod

  • Quite a regular

  • Posts: 359

  • Since: 2004/10/4


Is there any reason why you cannot upgrade to 2.0.13.1 ??


Cheers,

_Dan
Daniel Hall / XOOPS Module Development & Theme Design
Free XOOPS Support > My Wish List

4
freakingid
Re: Fatal error: Call to a member function on a non-object
  • 2005/8/19 21:49

  • freakingid

  • Just popping in

  • Posts: 10

  • Since: 2005/8/18


I was plagued by this same error after a 2.2.2 install.
I had not installed the new "UserManagement" module, because I thought it was an "extra," for adding custom fields to user information.

It turns out, you MUST install "UserManagement" if you expect to ever go to the user info page (/user.php)

Not sure how that might affect your 2.0x installation.

5
landry
Re: Fatal error: Call to a member function on a non-object
  • 2005/8/21 19:23

  • landry

  • Just popping in

  • Posts: 22

  • Since: 2005/6/7 2


Interesting that an upgrade to 2.0.13 produced a different error but an upgrade to 2.2.2 solved the issues. The upgrade FAQ was very helpful.

Am now repopulating the database. Then will reinstall my hacks.

Thanks for the help.

Best
Landry

Login

Who's Online

89 user(s) are online (69 user(s) are browsing Support Forums)


Members: 0


Guests: 89


more...

Donat-O-Meter

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

Latest GitHub Commits