Hi,

I am using the category module in conjuction with the taxonomy access control, and nodeaccess module.
I got for every link touched above error now in this constallation.
I need all the modules for the functionality I am using.

Can somebody help me please?
What is this error meaning? How can I resolve it?

Greetings and many thanks in advance,
Martijn

Comments

summit’s picture

Hi,
I may have solved it myzelf.
I think a module excedentally used $node without it being an array, so I check this again on the function aroudnd linke 1306.
The code was:

/**
 * Implementation of hook_nodeapi('update_index').
 */
function category_node_update_index(&$node) {
  $output = array();
  foreach ($node->category as $cat) {
    $output[] = $cat->title;
  }
  if (count($output)) {
    return '<strong>('. implode(', ', $output) .')</strong>';
  }
}

The new code I check if $node->category is an array.


/**
* Implementation of hook_nodeapi('update_index').
*/
function category_node_update_index(&$node) {
$output = array();
if (is_array($node->category)) {
foreach ($node->category as $cat) {
$output[] = $cat->title;
}
if (count($output)) {
return '('. implode(', ', $output) .')';
}
}
}

SO I added if (is_array($node->category)) { to the code.
Is this correct?
Please help.
greetings,
Martijn

JirkaRybka’s picture

Status: Active » Closed (fixed)

Even if this bug still stands in 4.7.x, that version is no more supported, and this issue got no reply for over 2 years.

Closing now.