From 0de72ee48438140ad16d15e5b4819bdc0d3ab995 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 5 Jun 2009 05:23:58 +0000 Subject: - Patch #225864 by pwolanin: prevent PHP errors from cron.php. --- modules/taxonomy/taxonomy.module | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/taxonomy/taxonomy.module') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 7c6889c03..1db756458 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -1639,8 +1639,10 @@ function taxonomy_node_validate($node, $form) { */ function taxonomy_node_update_index($node) { $output = array(); - foreach ($node->taxonomy as $term) { - $output[] = $term->name; + if (isset($node->taxonomy) && is_array($node->taxonomy)) { + foreach ($node->taxonomy as $term) { + $output[] = $term->name; + } } if (count($output)) { return '(' . implode(', ', $output) . ')'; -- cgit v1.2.3