Closed (duplicate)
Project:
Category
Version:
4.7.x-1.x-dev
Component:
Wrapper modules
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Sep 2006 at 08:04 UTC
Updated:
17 Sep 2006 at 23:17 UTC
Have a look at function taxonomy_link from taxonomy.module.copyme,v 1.15.2.7, around line 21:
function taxonomy_link($type, $node = NULL) {
if ($type == 'taxonomy terms') {
$type = 'categories';
if (isset($node->taxonomy) && is_array($node->taxonomy)) {
foreach ($node->taxonomy as $term) {
$cat = category_get_category($term->tid);
$node->category[$cid] = $cat;
}
}
}
elseif ($type == 'node') {
return array();
}
return category_link($type, $node);
}
See $node->category[$cid] = $cat;? I wonder if I'm overlooking something, but isn't $cid always NULL, since it is not initialized anywhere?
If so, this function cannot possibly work.
I can only guess, but I think the code was intended to do $node->category[$cat->cid] = $cat;
Comments
Comment #1
bdragon commentedExcellent catch!
This issue is a subset of the problems in
http://drupal.org/node/74629
I'm marking this issue as a duplicate. Thanks again for the insight!