summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-06-05 05:23:58 +0000
committerDries Buytaert <dries@buytaert.net>2009-06-05 05:23:58 +0000
commit0de72ee48438140ad16d15e5b4819bdc0d3ab995 (patch)
tree4eeb32598b2c4786a08e71ffa38def4deb448fe6 /modules/taxonomy/taxonomy.module
parent3780e8a6c208a668462fc44d7f32b8385611d8bf (diff)
downloadbrdo-0de72ee48438140ad16d15e5b4819bdc0d3ab995.tar.gz
brdo-0de72ee48438140ad16d15e5b4819bdc0d3ab995.tar.bz2
- Patch #225864 by pwolanin: prevent PHP errors from cron.php.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module6
1 files changed, 4 insertions, 2 deletions
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 '<strong>(' . implode(', ', $output) . ')</strong>';