17
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);
}
}