Aggregator2 autotaxonomy Blogger beta ATOM bug
fiLi - October 13, 2006 - 01:26
| Project: | Aggregator2 |
| Version: | HEAD |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi,
Lately, ever since the Blogger Beta update to their ATOM links, I've been getting the following error from Aggregator2's Autotaxonomy :
Fatal error: Cannot use string offset as an array in /modules/aggregator2/aggregator2_autotaxonomy.module
on line 41
RSS still seems to be working out okay.
Any ideas?

#1
Hmm.... this seems to be a PHP5 related issue.
Just to add an example feed with a probelm - http://feeds.feedburner.com/xslf/xmRH
-
I'm no PHP programmer, but this is what I implemented instead of lines 41-43 :
else if (is_array($node->rss_item_data['CATEGORY'][0]['TERM'][0]))
if ($node->rss_item_data['CATEGORY'][0]['TERM'][0]['VALUE']) {
$categories = $node->rss_item_data['CATEGORY']; // ATOM 1.0
} else {
if ($node->rss_item_data['ATOM:CATEGORY'][0]['TERM'][0]['VALUE']) $categories = $node->rss_item_data['ATOM:CATEGORY']; // ATOM 1.0
}
I just implemented the fix from the same problem with filter.module here : http://drupal.org/node/16481 to the autotaxonomy in aggregator2. I think it's just checking whether it's an array.
I would appericiate comments/fixed for this. It seems to be doing okay, but I can't be absolutely sure, since I have no idea if this is the right way.