From feaf0c625ee3d200fbed3ef40a403ccab062d5df Mon Sep 17 00:00:00 2001 From: Alex Barth <alex_b@53995.no-reply.drupal.org> Date: Thu, 16 Sep 2010 18:28:24 +0000 Subject: [PATCH] #908582 XiaN Vizjereij, alex_b: Fix 'Cannot use object of type stdClass as array' error in mappers/taxonomy.inc. --- CHANGELOG.txt | 2 ++ mappers/taxonomy.inc | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a29fde9a..4a09a92b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,8 @@ Feeds 6.x xxxxxxxxxxxxxxxxxxxxxx -------------------------------- +- #908582 XiaN Vizjereij, alex_b: Fix "Cannot use object of type stdClass as + array" error in mappers/taxonomy.inc. - #906654 alex_b: Fix phantom subscriptions. - #867892 alex_b: PubSubHubbub - slow down import frequency of feeds that are subscribed to hub. diff --git a/mappers/taxonomy.inc b/mappers/taxonomy.inc index 10307678..792795a2 100644 --- a/mappers/taxonomy.inc +++ b/mappers/taxonomy.inc @@ -95,13 +95,13 @@ function taxonomy_feeds_set_target(&$node, $key, $terms) { else { foreach ($terms as $term) { if ($term instanceof FeedsTermElement) { - $node->taxonomy[$vocabulary->vid][$term->tid] = $term->tid; + $node->taxonomy[$term->tid] = (object)$term; } // Check if a term already exists. elseif ($terms_found = taxonomy_get_term_by_name_vid($term, $vocabulary->vid)) { // If any terms are found add them to the node's taxonomy by found tid. foreach ($terms_found AS $term_found) { - $node->taxonomy[$vocabulary->vid][$term_found->tid] = $term_found->tid; + $node->taxonomy[$term_found->tid] = $term_found; if (!$vocabulary->multiple) { break; } -- GitLab