Index: taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.414
diff -u -p -r1.414 taxonomy.module
--- taxonomy.module 27 Jan 2008 17:55:15 -0000 1.414
+++ taxonomy.module 23 Feb 2008 21:30:00 -0000
@@ -1180,12 +1191,15 @@ function taxonomy_nodeapi($node, $op, $a
* Implementation of hook_nodeapi('update_index').
*/
function taxonomy_node_update_index(&$node) {
- $output = array();
- foreach ($node->taxonomy as $term) {
- $output[] = $term->name;
- }
- if (count($output)) {
- return '('. implode(', ', $output) .')';
+ if (is_object($node) && property_exists($node, 'taxonomy') &&
+ is_array($node->taxonomy)) {
+ $output = array();
+ foreach ($node->taxonomy as $term) {
+ $output[] = $term->name;
+ }
+ if (count($output)) {
+ return '('. implode(', ', $output) .')';
+ }
}
}