By artem_sokolov on
I don't see where to submit issue's for taxonomy_hide module, so writing here.
I'm using Drupal 4.7.0 & taxonomy_hide rev. 1.2 from cvs and regularly receiving error in logs:
Invalid argument supplied for foreach() in /var/www/....../modules/contrib/taxonomy_hide.module in row 67. upon every run of poormanscron (rev. 1.17). The number on error lines varies with each poormanscron execution.
This line is the line with foreach ($node->taxonomy as $key => $value) from function taxonomy_hide_nodeapi:
function taxonomy_hide_nodeapi(&$node, $op, $arg = 0, $arg2 = 0) {
if (!module_exist('taxonomy')) {
return;
}
switch ($op) {
case 'view':
$hidden = variable_get('taxonomy_hide_vocabularies', array ());
if (count($hidden) == 0 && !variable_get('taxonomy_hide_group_by_vocabulary', 0)) {
return;
}
foreach ($node->taxonomy as $key => $value) {
if ($hidden[$value->vid]) {
unset($node->taxonomy[$key]);
}
}
break;
}
return;
}
I suspect that it is being run on uncategorized nodes.
How to clear this up and correct the error?
Thank you.