Skip to content
Snippets Groups Projects
Commit feaf0c62 authored by Alex Barth's avatar Alex Barth
Browse files

#908582 XiaN Vizjereij, alex_b: Fix 'Cannot use object of type stdClass as...

#908582 XiaN Vizjereij, alex_b: Fix 'Cannot use object of type stdClass as array' error in mappers/taxonomy.inc.
parent b6921c32
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment