Download & Extend

foreach errors when a stream feed can't be fetched

Project:Activity Stream
Version:5.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:akalsey
Status:closed (fixed)

Issue Summary

When a stream that's based on activitystream_feed.module can't be fetched, the cron job results in an error.

warning: Invalid argument supplied for foreach() in modules/activitystream/activitystream_twitter/activitystream_twitter.module on line 20

This is especially a problem with services that are regularly down, like Twitter.

Comments

#1

Status:active» fixed

This is fixed in CVS. The issue is that if the feed module couldn't fetch a feed, it returned null. The dependent modules assume the return value is an array, resulting in an error. The fix is to return an empty array if a feed can't be fetched.

#2

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

nobody click here